Commit a45affee authored by 郭羽's avatar 郭羽

item feature clean

parent 8c4f8a33
...@@ -78,6 +78,9 @@ def getTrainColumns(train_columns,data_vocab): ...@@ -78,6 +78,9 @@ def getTrainColumns(train_columns,data_vocab):
# 离散特征 # 离散特征
for feature in train_columns: for feature in train_columns:
if data_vocab.get(feature): if data_vocab.get(feature):
if feature.startswith("user__second") and not feature.endswith("1"):
continue
cat_col = tf.feature_column.categorical_column_with_vocabulary_list(key=feature,vocabulary_list=data_vocab[feature]) cat_col = tf.feature_column.categorical_column_with_vocabulary_list(key=feature,vocabulary_list=data_vocab[feature])
col = tf.feature_column.embedding_column(cat_col, 10) col = tf.feature_column.embedding_column(cat_col, 10)
emb_columns.append(col) emb_columns.append(col)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment