be65ce986a45bf2f35b5494db3fa6e993b905aeb,examples/run_classification_criteo.py,,,#,9
Before Change
sparse_feature_list = [SingleFeat(feat, data[feat].nunique())
for feat in sparse_features]
dense_feature_list = [SingleFeat(feat, 0,)
for feat in dense_features]
// 3.generate input data for model
train, test = train_test_split(data, test_size=0.2)
train_model_input = [train[feat.name].values for feat in sparse_feature_list] + \
[train[feat.name].values for feat in dense_feature_list]
test_model_input = [test[feat.name].values for feat in sparse_feature_list] + \
[test[feat.name].values for feat in dense_feature_list]
// 4.Define Model,train,predict and evaluate
model = DeepFM({"sparse": sparse_feature_list,
"dense": dense_feature_list}, task="binary")
After Change
// 2.count //unique features for each sparse field,and record dense feature field name
fixlen_feature_columns = [SparseFeat(feat, data[feat].nunique())
for feat in sparse_features] + [DenseFeat(feat, 1,)
for feat in dense_features]
dnn_feature_columns = fixlen_feature_columns
linear_feature_columns = fixlen_feature_columns
fixlen_feature_names = get_fixlen_feature_names(linear_feature_columns + dnn_feature_columns)
// 3.generate input data for model
train, test = train_test_split(data, test_size=0.2)
train_model_input = [train[name] for name in fixlen_feature_names]
test_model_input = [test[name] for name in fixlen_feature_names]
// 4.Define Model,train,predict and evaluate
model = DeepFM(linear_feature_columns, dnn_feature_columns, task="binary")
model.compile("adam", "binary_crossentropy",
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 22
Instances
Project Name: shenweichen/DeepCTR
Commit Name: be65ce986a45bf2f35b5494db3fa6e993b905aeb
Time: 2019-06-30
Author: wcshen1994@163.com
File Name: examples/run_classification_criteo.py
Class Name:
Method Name:
Project Name: shenweichen/DeepCTR
Commit Name: be65ce986a45bf2f35b5494db3fa6e993b905aeb
Time: 2019-06-30
Author: wcshen1994@163.com
File Name: examples/run_classification_criteo.py
Class Name:
Method Name:
Project Name: shenweichen/DeepCTR
Commit Name: be65ce986a45bf2f35b5494db3fa6e993b905aeb
Time: 2019-06-30
Author: wcshen1994@163.com
File Name: examples/run_classification_criteo_hash.py
Class Name:
Method Name:
Project Name: shenweichen/DeepCTR
Commit Name: be65ce986a45bf2f35b5494db3fa6e993b905aeb
Time: 2019-06-30
Author: wcshen1994@163.com
File Name: tests/models/DIN_test.py
Class Name:
Method Name: get_xy_fd
Project Name: shenweichen/DeepCTR
Commit Name: be65ce986a45bf2f35b5494db3fa6e993b905aeb
Time: 2019-06-30
Author: wcshen1994@163.com
File Name: examples/run_din.py
Class Name:
Method Name: get_xy_fd