featuretools.get_valid_primitives(entityset, target_entity, max_depth=2, selected_primitives=None)[source]

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


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).

  • entityset (EntitySet) – An already initialized entityset

  • target_entity (str) – Entity id of entity 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


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

Return type

list[AggregationPrimitive], list[TransformPrimitive]