Skip to content

Instantly share code, notes, and snippets.

@MaartenGr
Last active August 9, 2019 07:32
Show Gist options
  • Save MaartenGr/e56ab51e0370281c55730baf00682490 to your computer and use it in GitHub Desktop.
Save MaartenGr/e56ab51e0370281c55730baf00682490 to your computer and use it in GitHub Desktop.
import featuretools as ft
import pandas as pd
# Create Entity
turnover_df = pd.read_csv('turnover.csv')
es = ft.EntitySet(id = 'Turnover')
es.entity_from_dataframe(entity_id = 'hr', dataframe = turnover_df, index = 'index')
# Run deep feature synthesis with transformation primitives
feature_matrix, feature_defs = ft.dfs(entityset = es, target_entity = 'hr',
trans_primitives = ['add_numeric', 'multiply_numeric'],
verbose=True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment