MadLib._internal.feature.feature.Feature
- class MadLib._internal.feature.feature.Feature(a_attr: str, b_attr: str)[source]
Bases:
ABC
Methods
__init__
(a_attr, b_attr)build
(A, B, cache)Guarenteed to be called before the features preprocessing is done.
preprocess
(data, is_table_a)preprocess the data, adding the output column to data
preprocess_output_column
(for_table_a)get the name of the preprocessing output column for table A or B
template
(**kwargs)Attributes
the name of the attribute from table a used to generate this feature
the name of the attribute from table a used to generate this feature
- property a_attr
the name of the attribute from table a used to generate this feature
- property b_attr
the name of the attribute from table a used to generate this feature
- build(A, B, cache)[source]
Guarenteed to be called before the features preprocessing is done. this method should generate and store all of the metadata required to compute the features over A and B, NOTE B may be None