Toggle Menu
Prev Up Next

scikit-learn 1.3.2
Other versions

Please cite us if you use the software.

# `sklearn.base`.OutlierMixin

class sklearn.base.OutlierMixin

  Mixin class for all outlier detection estimators in scikit-learn.

  Methods

  `fit_predict`(X[, y]) | Perform fit on X and returns labels for X.

  fit_predict(X, y=None)

    Perform fit on X and returns labels for X.

    Returns -1 for outliers and 1 for inliers.

    Parameters:
      X{array-like, sparse matrix} of shape (n_samples, n_features)

        The input samples.

      y Ignored

        Not used, present for API consistency by convention.

    Returns:
      y ndarray of shape (n_samples,)

        1 for inliers, -1 for outliers.