featuretools.get_valid_primitives#

featuretools.get_valid_primitives(entityset, target_dataframe_name, max_depth=2, selected_primitives=None, **dfs_kwargs)[source]#

Returns two lists of primitives (transform and aggregation) containing primitives that can be applied to the specific target dataframe to create features. If the optional ‘selected_primitives’ parameter is not used, all discoverable primitives will be considered.

Note

When using a max_depth greater than 1, some primitives returned by this function may not create any features if passed to DFS alone. These primitives relied on features created by other primitives as input (primitive stacking).

Parameters:
  • entityset (EntitySet) – An already initialized entityset

  • target_dataframe_name (str) – Name of dataframe to create features for.

  • max_depth (int, optional) – Maximum allowed depth of features.

  • selected_primitives (list[str or AggregationPrimitive/TransformPrimitive], optional) – list of primitives to consider when looking for valid primitives. If None, all primitives will be considered

  • dfs_kwargs (keywords) – Additional keyword arguments to pass as keyword arguments to the DeepFeatureSynthesis object. Should not include max_depth, agg_primitives, or trans_primitives, as those are passed in explicity.

Returns:

The list of valid aggregation primitives and the list of valid transform primitives.

Return type:

list[AggregationPrimitive], list[TransformPrimitive]