Last active
August 15, 2018 15:02
-
-
Save WillKoehrsen/c9d3fc6b0713358632673d418a661a13 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def feature_matrix_from_entityset(es_dict, feature_defs): | |
"""Run deep feature synthesis from an entityset and feature definitions. | |
Saves feature matrix based on partition number.""" | |
# Extract the entityset | |
es = es_dict['es'] | |
# Calculate the feature matrix and save | |
feature_matrix = ft.calculate_feature_matrix(feature_definitions, | |
entityset=es, | |
n_jobs = 1, | |
verbose = 0, | |
chunk_size = es['app'].df.shape[0]) | |
feature_matrix.to_csv('../input/fm/p%d_fm.csv' % es_dict['num'], index = True) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment