package sklearn

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type tag = [
  1. | `BaseGradientBoosting
]
type t = [ `BaseEnsemble | `BaseEstimator | `BaseGradientBoosting | `MetaEstimatorMixin | `Object ] Obj.t
val of_pyobject : Py.Object.t -> t
val to_pyobject : [> tag ] Obj.t -> Py.Object.t
val as_ensemble : t -> [ `BaseEnsemble ] Obj.t
val as_estimator : t -> [ `BaseEstimator ] Obj.t
val as_meta_estimator : t -> [ `MetaEstimatorMixin ] Obj.t
val get_item : index:Py.Object.t -> [> tag ] Obj.t -> Py.Object.t

Return the index'th estimator in the ensemble.

val iter : [> tag ] Obj.t -> Dict.t Seq.t

Return iterator over estimators in the ensemble.

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

Apply trees in the ensemble to X, return leaf indices.

.. versionadded:: 0.17

Parameters ---------- X : array-like, sparse matrix, shape (n_samples, n_features) The input samples. Internally, its dtype will be converted to ``dtype=np.float32``. If a sparse matrix is provided, it will be converted to a sparse ``csr_matrix``.

Returns ------- X_leaves : array-like, shape (n_samples, n_estimators, n_classes) For each datapoint x in X and for each tree in the ensemble, return the index of the leaf x ends up in each estimator. In the case of binary classification n_classes is 1.

val fit : ?sample_weight:[> `ArrayLike ] Np.Obj.t -> ?monitor:Py.Object.t -> x:[> `ArrayLike ] Np.Obj.t -> y:[> `ArrayLike ] Np.Obj.t -> [> tag ] Obj.t -> t

Fit the gradient boosting model.

Parameters ---------- X : array-like, sparse matrix, shape (n_samples, n_features) The input samples. Internally, it will be converted to ``dtype=np.float32`` and if a sparse matrix is provided to a sparse ``csr_matrix``.

y : array-like, shape (n_samples,) Target values (strings or integers in classification, real numbers in regression) For classification, labels must correspond to classes.

sample_weight : array-like, shape (n_samples,) or None Sample weights. If None, then samples are equally weighted. Splits that would create child nodes with net zero or negative weight are ignored while searching for a split in each node. In the case of classification, splits are also ignored if they would result in any single class carrying a negative weight in either child node.

monitor : callable, optional The monitor is called after each iteration with the current iteration, a reference to the estimator and the local variables of ``_fit_stages`` as keyword arguments ``callable(i, self, locals())``. If the callable returns ``True`` the fitting procedure is stopped. The monitor can be used for various things such as computing held-out estimates, early stopping, model introspect, and snapshoting.

Returns ------- self : object

val get_params : ?deep:bool -> [> tag ] Obj.t -> Dict.t

Get parameters for this estimator.

Parameters ---------- deep : bool, default=True If True, will return the parameters for this estimator and contained subobjects that are estimators.

Returns ------- params : mapping of string to any Parameter names mapped to their values.

val set_params : ?params:(string * Py.Object.t) list -> [> tag ] Obj.t -> t

Set the parameters of this estimator.

The method works on simple estimators as well as on nested objects (such as pipelines). The latter have parameters of the form ``<component>__<parameter>`` so that it's possible to update each component of a nested object.

Parameters ---------- **params : dict Estimator parameters.

Returns ------- self : object Estimator instance.

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 : Format.formatter -> t -> unit

Pretty-print the object to a formatter.

OCaml

Innovation. Community. Security.