featuretools.save_features

featuretools.save_features(features, filepath)

Saves the features list as JSON to a specificed filepath.

Parameters
  • features (list[FeatureBase]) – List of Feature definitions.

  • filepath (str) – The location of where to save the features list. This must include the name of the file.

Note

Features saved in one version of Featuretools are not guaranteed to work in another. After upgrading Featuretools, features may need to be generated again.

Example

f1 = ft.Feature(es["log"]["product_id"])
f2 = ft.Feature(es["log"]["purchased"])
f3 = ft.Feature(es["log"]["value"])

features = [f1, f2, f3]

filepath = os.path.join('/Home/features/', 'list')
ft.save_features(features, filepath)

See also

load_features()