package sklearn

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type tag = [
  1. | `SelectorMixin
]
type t = [ `Object | `SelectorMixin | `TransformerMixin ] Obj.t
val of_pyobject : Py.Object.t -> t
val to_pyobject : [> tag ] Obj.t -> Py.Object.t
val as_transformer : t -> [ `TransformerMixin ] Obj.t
val fit_transform : ?y:[> `ArrayLike ] Np.Obj.t -> ?fit_params:(string * Py.Object.t) list -> x:[> `ArrayLike ] Np.Obj.t -> [> tag ] Obj.t -> [> `ArrayLike ] Np.Obj.t

Fit to data, then transform it.

Fits transformer to X and y with optional parameters fit_params and returns a transformed version of X.

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

y : ndarray of shape (n_samples,), default=None Target values.

**fit_params : dict Additional fit parameters.

Returns ------- X_new : ndarray array of shape (n_samples, n_features_new) Transformed array.

val get_support : ?indices:bool -> [> tag ] Obj.t -> [> `ArrayLike ] Np.Obj.t

Get a mask, or integer index, of the features selected

Parameters ---------- indices : boolean (default False) If True, the return value will be an array of integers, rather than a boolean mask.

Returns ------- support : array An index that selects the retained features from a feature vector. If `indices` is False, this is a boolean array of shape # input features, in which an element is True iff its corresponding feature is selected for retention. If `indices` is True, this is an integer array of shape # output features whose values are indices into the input feature vector.

val inverse_transform : x:[> `ArrayLike ] Np.Obj.t -> [> tag ] Obj.t -> [> `ArrayLike ] Np.Obj.t

Reverse the transformation operation

Parameters ---------- X : array of shape n_samples, n_selected_features The input samples.

Returns ------- X_r : array of shape n_samples, n_original_features `X` with columns of zeros inserted where features would have been removed by :meth:`transform`.

val transform : x:[> `ArrayLike ] Np.Obj.t -> [> tag ] Obj.t -> [> `ArrayLike ] Np.Obj.t

Reduce X to the selected features.

Parameters ---------- X : array of shape n_samples, n_features The input samples.

Returns ------- X_r : array of shape n_samples, n_selected_features The input samples with only the selected features.

val to_string : t -> string

Print the object to a human-readable representation.

val show : t -> string

Print the object to a human-readable representation.

val pp : Stdlib.Format.formatter -> t -> unit

Pretty-print the object to a formatter.