// 2.count //unique features for each sparse field,and record dense feature field name
sparse_feature_dict = {feat: data[feat].nunique()
for feat in sparse_features}
dense_feature_list = dense_features
// 3.generate input data for model
After Change
// 2.count //unique features for each sparse field,and record dense feature field name
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