Toggle Menu
Prev Up Next

scikit-learn 1.3.2
Other versions

Please cite us if you use the software.

# `sklearn.base`.OneToOneFeatureMixin

class sklearn.base.OneToOneFeatureMixin

  Provides `get_feature_names_out` for 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)

    Get output feature names for transformation.

    Parameters:
      input_features array-like of str or None, default=None

        Input features.

        - If `input_features` is `None`, then `feature_names_in_` is used as feature names in. If `feature_names_in_` is not defined, then the following input feature names are generated: `["x0", "x1", ..., "x(n_features_in_ - 1)"]`.

        - If `input_features` is an array-like, then `input_features` must match `feature_names_in_` if `feature_names_in_` is defined.

    Returns:
      feature_names_out ndarray of str objects

        Same as input features.