src.utils.ftransf.explicit_selector
Classes
|
- class src.utils.ftransf.explicit_selector.ExplicitSelector(**kwargs)
- Author:
Alberto M. Esmoris Pena
Class for transforming features by discarding or preserving exactly those given as input.
- Variables:
fnames (list of str) – The names of the features that must be either discarded or preserved.
preserve (bool) – The flag governing whether to preserve the given features (True, default) or not (False).
- static extract_ftransf_args(spec)
Extract the arguments to initialize/instantiate an ExplicitSelector.
- Parameters:
spec – The key-word specification containing the arguments.
- Returns:
The arguments to initialize/instantiate an ExplicitSelector.
- __init__(**kwargs)
Initialize/instantiate a ExplicitSelector.
- Parameters:
kwargs – The attributes for the ExplicitSelector.
- transform(F, y=None, fnames=None, out_prefix=None, F_fnames=None)
The fundamental feature transform logic defining the explicit selector.
See
FeatureTransformerandfeature_transformer.FeatureTransformer.transform().Note that, to the contrary of many other feature transformers, the logic in this transform method is not adequate to be called from the corresponding transform_pcloud (as it has been overriden to efficiently deal with point clouds as input).
- Parameters:
F_fnames (list of str) – The names of the features (columns) for the input feature space matrix F.
- transform_pcloud(pcloud, out_prefix=None, fnames=None)
Apply the explicit selector to a point cloud, overwriting the parent’s logic to send the names of the features (columns) of the matrix F.
See
feature_transformer.FeatureTransformer.transform_pcloud().