Вы можете использовать max_depth
для управления сложностью функций. Когда max_depth=1
, примитивы будут использовать только оригинальные функции.
features = ft.dfs(
entityset=es,
target_entity='data',
trans_primitives=['divide_by_feature', 'modulo_numeric'],
features_only=True,
max_depth=1,
)
[<Feature: f1>,
<Feature: f2>,
<Feature: f3>,
<Feature: f4>,
<Feature: 1 / f3>,
<Feature: 1 / f1>,
<Feature: 1 / f2>,
<Feature: 1 / f4>,
<Feature: f1 % f2>,
<Feature: f4 % f3>,
<Feature: f4 % f2>,
<Feature: f1 % f3>,
<Feature: f2 % f4>,
<Feature: f4 % f1>,
<Feature: f3 % f2>,
<Feature: f3 % f1>,
<Feature: f2 % f1>,
<Feature: f3 % f4>,
<Feature: f2 % f3>,
<Feature: f1 % f4>]
Вы можете использовать все примитивы преобразования, извлекая имена из списка примитивов.
primitives = ft.list_primitives()
primitives = primitives.groupby('type')
transforms = primitives.get_group('transform')
transforms = transforms.name.values.tolist()
['less_than_scalar',
'divide_numeric',
'latitude',
'add_numeric',
'week',
'greater_than_equal_to_scalar',
'and',
'multiply_numeric_scalar',
'not',
'second',
'greater_than_scalar',
'modulo_numeric_scalar',
'scalar_subtract_numeric_feature',
'diff',
'day',
'cum_min',
'divide_by_feature',
'less_than_equal_to',
'time_since',
'time_since_previous',
'cum_count',
'year',
'is_null',
'num_characters',
'equal_scalar',
'is_weekend',
'less_than_equal_to_scalar',
'longitude',
'add_numeric_scalar',
'month',
'less_than',
'or',
'multiply_boolean',
'percentile',
'minute',
'not_equal_scalar',
'greater_than_equal_to',
'modulo_by_feature',
'multiply_numeric',
'negate',
'hour',
'cum_max',
'greater_than',
'modulo_numeric',
'subtract_numeric_scalar',
'isin',
'cum_mean',
'divide_numeric_scalar',
'num_words',
'absolute',
'cum_sum',
'not_equal',
'weekday',
'equal',
'haversine',
'subtract_numeric']
Дайте мне знать, если это поможет.