This PR improves tira.pt.doc_features and tira.pt.query_features by adding two parameters:
feature_selection: allows for filtering the features to be included in the transformer. For instance, if the TIRA component returns columns a, b, and c, setting feature_selection=('a', 'b') ensures only a and b are actually added to the features column.
map_features: allows a custom transformation of specific features. For instance, if column a is a categorical variable with values A, B, and C, setting map_features={'a': one_hot_encode(('A', 'B', 'C'))} can help transform the a column into three features, one-hot-encoding the values A, B and C.
This PR improves
tira.pt.doc_features
andtira.pt.query_features
by adding two parameters:feature_selection
: allows for filtering the features to be included in the transformer. For instance, if the TIRA component returns columnsa
,b
, andc
, settingfeature_selection=('a', 'b')
ensures onlya
andb
are actually added to thefeatures
column.map_features
: allows a custom transformation of specific features. For instance, if columna
is a categorical variable with valuesA
,B
, andC
, settingmap_features={'a': one_hot_encode(('A', 'B', 'C'))}
can help transform thea
column into three features, one-hot-encoding the valuesA
,B
andC
.