sklearn.base.OneToOneFeatureMixin¶
- class sklearn.base.OneToOneFeatureMixin[source]¶
Provides
get_feature_names_outfor simple transformers.This mixin assumes there’s a 1-to-1 correspondence between input features and output features, such as
StandardScaler.Methods
get_feature_names_out([input_features])Get output feature names for transformation.
- get_feature_names_out(input_features=None)[source]¶
Get output feature names for transformation.
- Parameters:
- input_featuresarray-like of str or None, default=None
Input features.
If
input_featuresisNone, thenfeature_names_in_is used as feature names in. Iffeature_names_in_is not defined, then the following input feature names are generated:["x0", "x1", ..., "x(n_features_in_ - 1)"].If
input_featuresis an array-like, theninput_featuresmust matchfeature_names_in_iffeature_names_in_is defined.
- Returns:
- feature_names_outndarray of str objects
Same as input features.