INNER CODE UNIT · Python
agg_primitives
alteryx/open_source_demos · predict-correct-answer/utils.py:103
agg_primitives=[Sum, Mean] + custom_agg,
trans_primitives=[Hour],
max_depth=3,
approximate='2m',
cutoff_time=cutoff_times,
verbose=True)
fm_enc, _ = ft.encode_features(fm, features)
fm_enc = fm_enc.fillna(0)
fm_enc = remove_low_information_features(fm_enc)
labels = fm.pop(label)
return (fm_enc, labels)
def estimate_score(fm_enc, label, splitter):
k = 0
for train_index, test_index in splitter.split(fm_enc):
clf = RandomForestClassifier()
X_train, X_test = fm_enc.iloc[train_index], fm_enc.iloc[test_index]