Last active
October 23, 2018 19:27
-
-
Save WillKoehrsen/0197ac32c28fa045bb9c7de92c75cc46 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
import featuretools as ft | |
# Primitives for deep feature synthesis | |
trans_primitives = ['weekend', 'cum_sum', 'day', 'month', 'diff', 'time_since_previous'] | |
agg_primitives = ['sum', 'time_since_last', 'avg_time_between', 'all', 'mode', | |
'num_unique', 'min', 'last', 'mean', 'percent_true', | |
'max', 'std', 'count'] | |
# Perform deep feature synthesis | |
feature_matrix, feature_names = ft.dfs(entityset=es, | |
trans_primitives = trans_primitives, | |
agg_primitives = agg_primitives, | |
target_entity='customers', | |
cutoff_times=cutoff_times) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment