be65ce986a45bf2f35b5494db3fa6e993b905aeb,examples/run_classification_criteo_hash.py,,,#,9

Before Change



    sparse_feature_list = [SingleFeat(feat, 1000, hash_flag=True, dtype="string")  // since the input is string
                           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


                              for feat in sparse_features] + [DenseFeat(feat, 1, )
                          for feat in dense_features]

    linear_feature_columns = fixlen_feature_columns
    dnn_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")
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 14

Instances


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: examples/run_classification_criteo.py
Class Name:
Method Name:


Project Name: stellargraph/stellargraph
Commit Name: b52e083827ce7aefda75c4370db0ad6942e27dae
Time: 2018-08-12
Author: docherty@gmail.com
File Name: stellar/mapper/node_mappers.py
Class Name: HinSAGENodeMapper
Method Name: __getitem__