doc_content stringlengths 1 386k | doc_id stringlengths 5 188 |
|---|---|
predict(X) [source]
Predict class for X. The predicted class of an input sample is a vote by the trees in the forest, weighted by their probability estimates. That is, the predicted class is the one with highest mean probability estimate across the trees. Parameters
X{array-like, sparse matrix} of shape (n_sample... | sklearn.modules.generated.sklearn.ensemble.extratreesclassifier#sklearn.ensemble.ExtraTreesClassifier.predict |
predict_log_proba(X) [source]
Predict class log-probabilities for X. The predicted class log-probabilities of an input sample is computed as the log of the mean predicted class probabilities of the trees in the forest. Parameters
X{array-like, sparse matrix} of shape (n_samples, n_features)
The input samples. I... | sklearn.modules.generated.sklearn.ensemble.extratreesclassifier#sklearn.ensemble.ExtraTreesClassifier.predict_log_proba |
predict_proba(X) [source]
Predict class probabilities for X. The predicted class probabilities of an input sample are computed as the mean predicted class probabilities of the trees in the forest. The class probability of a single tree is the fraction of samples of the same class in a leaf. Parameters
X{array-lik... | sklearn.modules.generated.sklearn.ensemble.extratreesclassifier#sklearn.ensemble.ExtraTreesClassifier.predict_proba |
score(X, y, sample_weight=None) [source]
Return the mean accuracy on the given test data and labels. In multi-label classification, this is the subset accuracy which is a harsh metric since you require for each sample that each label set be correctly predicted. Parameters
Xarray-like of shape (n_samples, n_featur... | sklearn.modules.generated.sklearn.ensemble.extratreesclassifier#sklearn.ensemble.ExtraTreesClassifier.score |
set_params(**params) [source]
Set the parameters of this estimator. The method works on simple estimators as well as on nested objects (such as Pipeline). The latter have parameters of the form <component>__<parameter> so that it’s possible to update each component of a nested object. Parameters
**paramsdict
Es... | sklearn.modules.generated.sklearn.ensemble.extratreesclassifier#sklearn.ensemble.ExtraTreesClassifier.set_params |
class sklearn.ensemble.ExtraTreesRegressor(n_estimators=100, *, criterion='mse', max_depth=None, min_samples_split=2, min_samples_leaf=1, min_weight_fraction_leaf=0.0, max_features='auto', max_leaf_nodes=None, min_impurity_decrease=0.0, min_impurity_split=None, bootstrap=False, oob_score=False, n_jobs=None, random_stat... | sklearn.modules.generated.sklearn.ensemble.extratreesregressor#sklearn.ensemble.ExtraTreesRegressor |
sklearn.ensemble.ExtraTreesRegressor
class sklearn.ensemble.ExtraTreesRegressor(n_estimators=100, *, criterion='mse', max_depth=None, min_samples_split=2, min_samples_leaf=1, min_weight_fraction_leaf=0.0, max_features='auto', max_leaf_nodes=None, min_impurity_decrease=0.0, min_impurity_split=None, bootstrap=False, oo... | sklearn.modules.generated.sklearn.ensemble.extratreesregressor |
apply(X) [source]
Apply trees in the forest to X, return leaf indices. Parameters
X{array-like, sparse matrix} of 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 into a sparse csr_matrix. Return... | sklearn.modules.generated.sklearn.ensemble.extratreesregressor#sklearn.ensemble.ExtraTreesRegressor.apply |
decision_path(X) [source]
Return the decision path in the forest. New in version 0.18. Parameters
X{array-like, sparse matrix} of 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 into a sparse csr... | sklearn.modules.generated.sklearn.ensemble.extratreesregressor#sklearn.ensemble.ExtraTreesRegressor.decision_path |
property feature_importances_
The impurity-based feature importances. The higher, the more important the feature. The importance of a feature is computed as the (normalized) total reduction of the criterion brought by that feature. It is also known as the Gini importance. Warning: impurity-based feature importances c... | sklearn.modules.generated.sklearn.ensemble.extratreesregressor#sklearn.ensemble.ExtraTreesRegressor.feature_importances_ |
fit(X, y, sample_weight=None) [source]
Build a forest of trees from the training set (X, y). Parameters
X{array-like, sparse matrix} of shape (n_samples, n_features)
The training input samples. Internally, its dtype will be converted to dtype=np.float32. If a sparse matrix is provided, it will be converted into... | sklearn.modules.generated.sklearn.ensemble.extratreesregressor#sklearn.ensemble.ExtraTreesRegressor.fit |
get_params(deep=True) [source]
Get parameters for this estimator. Parameters
deepbool, default=True
If True, will return the parameters for this estimator and contained subobjects that are estimators. Returns
paramsdict
Parameter names mapped to their values. | sklearn.modules.generated.sklearn.ensemble.extratreesregressor#sklearn.ensemble.ExtraTreesRegressor.get_params |
predict(X) [source]
Predict regression target for X. The predicted regression target of an input sample is computed as the mean predicted regression targets of the trees in the forest. Parameters
X{array-like, sparse matrix} of shape (n_samples, n_features)
The input samples. Internally, its dtype will be conve... | sklearn.modules.generated.sklearn.ensemble.extratreesregressor#sklearn.ensemble.ExtraTreesRegressor.predict |
score(X, y, sample_weight=None) [source]
Return the coefficient of determination \(R^2\) of the prediction. The coefficient \(R^2\) is defined as \((1 - \frac{u}{v})\), where \(u\) is the residual sum of squares ((y_true - y_pred)
** 2).sum() and \(v\) is the total sum of squares ((y_true -
y_true.mean()) ** 2).sum()... | sklearn.modules.generated.sklearn.ensemble.extratreesregressor#sklearn.ensemble.ExtraTreesRegressor.score |
set_params(**params) [source]
Set the parameters of this estimator. The method works on simple estimators as well as on nested objects (such as Pipeline). The latter have parameters of the form <component>__<parameter> so that it’s possible to update each component of a nested object. Parameters
**paramsdict
Es... | sklearn.modules.generated.sklearn.ensemble.extratreesregressor#sklearn.ensemble.ExtraTreesRegressor.set_params |
class sklearn.ensemble.GradientBoostingClassifier(*, loss='deviance', learning_rate=0.1, n_estimators=100, subsample=1.0, criterion='friedman_mse', min_samples_split=2, min_samples_leaf=1, min_weight_fraction_leaf=0.0, max_depth=3, min_impurity_decrease=0.0, min_impurity_split=None, init=None, random_state=None, max_fe... | sklearn.modules.generated.sklearn.ensemble.gradientboostingclassifier#sklearn.ensemble.GradientBoostingClassifier |
sklearn.ensemble.GradientBoostingClassifier
class sklearn.ensemble.GradientBoostingClassifier(*, loss='deviance', learning_rate=0.1, n_estimators=100, subsample=1.0, criterion='friedman_mse', min_samples_split=2, min_samples_leaf=1, min_weight_fraction_leaf=0.0, max_depth=3, min_impurity_decrease=0.0, min_impurity_sp... | sklearn.modules.generated.sklearn.ensemble.gradientboostingclassifier |
apply(X) [source]
Apply trees in the ensemble to X, return leaf indices. New in version 0.17. Parameters
X{array-like, sparse matrix} of 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 spars... | sklearn.modules.generated.sklearn.ensemble.gradientboostingclassifier#sklearn.ensemble.GradientBoostingClassifier.apply |
decision_function(X) [source]
Compute the decision function of X. Parameters
X{array-like, sparse matrix} of 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. Returns
scorendarray of shape (n_sam... | sklearn.modules.generated.sklearn.ensemble.gradientboostingclassifier#sklearn.ensemble.GradientBoostingClassifier.decision_function |
property feature_importances_
The impurity-based feature importances. The higher, the more important the feature. The importance of a feature is computed as the (normalized) total reduction of the criterion brought by that feature. It is also known as the Gini importance. Warning: impurity-based feature importances c... | sklearn.modules.generated.sklearn.ensemble.gradientboostingclassifier#sklearn.ensemble.GradientBoostingClassifier.feature_importances_ |
fit(X, y, sample_weight=None, monitor=None) [source]
Fit the gradient boosting model. Parameters
X{array-like, sparse matrix} of 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.
yarray-like of shape... | sklearn.modules.generated.sklearn.ensemble.gradientboostingclassifier#sklearn.ensemble.GradientBoostingClassifier.fit |
get_params(deep=True) [source]
Get parameters for this estimator. Parameters
deepbool, default=True
If True, will return the parameters for this estimator and contained subobjects that are estimators. Returns
paramsdict
Parameter names mapped to their values. | sklearn.modules.generated.sklearn.ensemble.gradientboostingclassifier#sklearn.ensemble.GradientBoostingClassifier.get_params |
predict(X) [source]
Predict class for X. Parameters
X{array-like, sparse matrix} of 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. Returns
yndarray of shape (n_samples,)
The predicted values... | sklearn.modules.generated.sklearn.ensemble.gradientboostingclassifier#sklearn.ensemble.GradientBoostingClassifier.predict |
predict_log_proba(X) [source]
Predict class log-probabilities for X. Parameters
X{array-like, sparse matrix} of 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. Returns
pndarray of shape (n_samp... | sklearn.modules.generated.sklearn.ensemble.gradientboostingclassifier#sklearn.ensemble.GradientBoostingClassifier.predict_log_proba |
predict_proba(X) [source]
Predict class probabilities for X. Parameters
X{array-like, sparse matrix} of 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. Returns
pndarray of shape (n_samples, n_c... | sklearn.modules.generated.sklearn.ensemble.gradientboostingclassifier#sklearn.ensemble.GradientBoostingClassifier.predict_proba |
score(X, y, sample_weight=None) [source]
Return the mean accuracy on the given test data and labels. In multi-label classification, this is the subset accuracy which is a harsh metric since you require for each sample that each label set be correctly predicted. Parameters
Xarray-like of shape (n_samples, n_featur... | sklearn.modules.generated.sklearn.ensemble.gradientboostingclassifier#sklearn.ensemble.GradientBoostingClassifier.score |
set_params(**params) [source]
Set the parameters of this estimator. The method works on simple estimators as well as on nested objects (such as Pipeline). The latter have parameters of the form <component>__<parameter> so that it’s possible to update each component of a nested object. Parameters
**paramsdict
Es... | sklearn.modules.generated.sklearn.ensemble.gradientboostingclassifier#sklearn.ensemble.GradientBoostingClassifier.set_params |
staged_decision_function(X) [source]
Compute decision function of X for each iteration. This method allows monitoring (i.e. determine error on testing set) after each stage. Parameters
X{array-like, sparse matrix} of shape (n_samples, n_features)
The input samples. Internally, it will be converted to dtype=np.f... | sklearn.modules.generated.sklearn.ensemble.gradientboostingclassifier#sklearn.ensemble.GradientBoostingClassifier.staged_decision_function |
staged_predict(X) [source]
Predict class at each stage for X. This method allows monitoring (i.e. determine error on testing set) after each stage. Parameters
X{array-like, sparse matrix} of shape (n_samples, n_features)
The input samples. Internally, it will be converted to dtype=np.float32 and if a sparse mat... | sklearn.modules.generated.sklearn.ensemble.gradientboostingclassifier#sklearn.ensemble.GradientBoostingClassifier.staged_predict |
staged_predict_proba(X) [source]
Predict class probabilities at each stage for X. This method allows monitoring (i.e. determine error on testing set) after each stage. Parameters
X{array-like, sparse matrix} of shape (n_samples, n_features)
The input samples. Internally, it will be converted to dtype=np.float32... | sklearn.modules.generated.sklearn.ensemble.gradientboostingclassifier#sklearn.ensemble.GradientBoostingClassifier.staged_predict_proba |
class sklearn.ensemble.GradientBoostingRegressor(*, loss='ls', learning_rate=0.1, n_estimators=100, subsample=1.0, criterion='friedman_mse', min_samples_split=2, min_samples_leaf=1, min_weight_fraction_leaf=0.0, max_depth=3, min_impurity_decrease=0.0, min_impurity_split=None, init=None, random_state=None, max_features=... | sklearn.modules.generated.sklearn.ensemble.gradientboostingregressor#sklearn.ensemble.GradientBoostingRegressor |
sklearn.ensemble.GradientBoostingRegressor
class sklearn.ensemble.GradientBoostingRegressor(*, loss='ls', learning_rate=0.1, n_estimators=100, subsample=1.0, criterion='friedman_mse', min_samples_split=2, min_samples_leaf=1, min_weight_fraction_leaf=0.0, max_depth=3, min_impurity_decrease=0.0, min_impurity_split=None... | sklearn.modules.generated.sklearn.ensemble.gradientboostingregressor |
apply(X) [source]
Apply trees in the ensemble to X, return leaf indices. New in version 0.17. Parameters
X{array-like, sparse matrix} of 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 spars... | sklearn.modules.generated.sklearn.ensemble.gradientboostingregressor#sklearn.ensemble.GradientBoostingRegressor.apply |
property feature_importances_
The impurity-based feature importances. The higher, the more important the feature. The importance of a feature is computed as the (normalized) total reduction of the criterion brought by that feature. It is also known as the Gini importance. Warning: impurity-based feature importances c... | sklearn.modules.generated.sklearn.ensemble.gradientboostingregressor#sklearn.ensemble.GradientBoostingRegressor.feature_importances_ |
fit(X, y, sample_weight=None, monitor=None) [source]
Fit the gradient boosting model. Parameters
X{array-like, sparse matrix} of 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.
yarray-like of shape... | sklearn.modules.generated.sklearn.ensemble.gradientboostingregressor#sklearn.ensemble.GradientBoostingRegressor.fit |
get_params(deep=True) [source]
Get parameters for this estimator. Parameters
deepbool, default=True
If True, will return the parameters for this estimator and contained subobjects that are estimators. Returns
paramsdict
Parameter names mapped to their values. | sklearn.modules.generated.sklearn.ensemble.gradientboostingregressor#sklearn.ensemble.GradientBoostingRegressor.get_params |
predict(X) [source]
Predict regression target for X. Parameters
X{array-like, sparse matrix} of 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. Returns
yndarray of shape (n_samples,)
The pred... | sklearn.modules.generated.sklearn.ensemble.gradientboostingregressor#sklearn.ensemble.GradientBoostingRegressor.predict |
score(X, y, sample_weight=None) [source]
Return the coefficient of determination \(R^2\) of the prediction. The coefficient \(R^2\) is defined as \((1 - \frac{u}{v})\), where \(u\) is the residual sum of squares ((y_true - y_pred)
** 2).sum() and \(v\) is the total sum of squares ((y_true -
y_true.mean()) ** 2).sum()... | sklearn.modules.generated.sklearn.ensemble.gradientboostingregressor#sklearn.ensemble.GradientBoostingRegressor.score |
set_params(**params) [source]
Set the parameters of this estimator. The method works on simple estimators as well as on nested objects (such as Pipeline). The latter have parameters of the form <component>__<parameter> so that it’s possible to update each component of a nested object. Parameters
**paramsdict
Es... | sklearn.modules.generated.sklearn.ensemble.gradientboostingregressor#sklearn.ensemble.GradientBoostingRegressor.set_params |
staged_predict(X) [source]
Predict regression target at each stage for X. This method allows monitoring (i.e. determine error on testing set) after each stage. Parameters
X{array-like, sparse matrix} of shape (n_samples, n_features)
The input samples. Internally, it will be converted to dtype=np.float32 and if ... | sklearn.modules.generated.sklearn.ensemble.gradientboostingregressor#sklearn.ensemble.GradientBoostingRegressor.staged_predict |
class sklearn.ensemble.HistGradientBoostingClassifier(loss='auto', *, learning_rate=0.1, max_iter=100, max_leaf_nodes=31, max_depth=None, min_samples_leaf=20, l2_regularization=0.0, max_bins=255, categorical_features=None, monotonic_cst=None, warm_start=False, early_stopping='auto', scoring='loss', validation_fraction=... | sklearn.modules.generated.sklearn.ensemble.histgradientboostingclassifier#sklearn.ensemble.HistGradientBoostingClassifier |
sklearn.ensemble.HistGradientBoostingClassifier
class sklearn.ensemble.HistGradientBoostingClassifier(loss='auto', *, learning_rate=0.1, max_iter=100, max_leaf_nodes=31, max_depth=None, min_samples_leaf=20, l2_regularization=0.0, max_bins=255, categorical_features=None, monotonic_cst=None, warm_start=False, early_sto... | sklearn.modules.generated.sklearn.ensemble.histgradientboostingclassifier |
decision_function(X) [source]
Compute the decision function of X. Parameters
Xarray-like, shape (n_samples, n_features)
The input samples. Returns
decisionndarray, shape (n_samples,) or (n_samples, n_trees_per_iteration)
The raw predicted values (i.e. the sum of the trees leaves) for each sample. n_tree... | sklearn.modules.generated.sklearn.ensemble.histgradientboostingclassifier#sklearn.ensemble.HistGradientBoostingClassifier.decision_function |
fit(X, y, sample_weight=None) [source]
Fit the gradient boosting model. Parameters
Xarray-like of shape (n_samples, n_features)
The input samples.
yarray-like of shape (n_samples,)
Target values.
sample_weightarray-like of shape (n_samples,) default=None
Weights of training data. New in version 0.23. ... | sklearn.modules.generated.sklearn.ensemble.histgradientboostingclassifier#sklearn.ensemble.HistGradientBoostingClassifier.fit |
get_params(deep=True) [source]
Get parameters for this estimator. Parameters
deepbool, default=True
If True, will return the parameters for this estimator and contained subobjects that are estimators. Returns
paramsdict
Parameter names mapped to their values. | sklearn.modules.generated.sklearn.ensemble.histgradientboostingclassifier#sklearn.ensemble.HistGradientBoostingClassifier.get_params |
predict(X) [source]
Predict classes for X. Parameters
Xarray-like, shape (n_samples, n_features)
The input samples. Returns
yndarray, shape (n_samples,)
The predicted classes. | sklearn.modules.generated.sklearn.ensemble.histgradientboostingclassifier#sklearn.ensemble.HistGradientBoostingClassifier.predict |
predict_proba(X) [source]
Predict class probabilities for X. Parameters
Xarray-like, shape (n_samples, n_features)
The input samples. Returns
pndarray, shape (n_samples, n_classes)
The class probabilities of the input samples. | sklearn.modules.generated.sklearn.ensemble.histgradientboostingclassifier#sklearn.ensemble.HistGradientBoostingClassifier.predict_proba |
score(X, y, sample_weight=None) [source]
Return the mean accuracy on the given test data and labels. In multi-label classification, this is the subset accuracy which is a harsh metric since you require for each sample that each label set be correctly predicted. Parameters
Xarray-like of shape (n_samples, n_featur... | sklearn.modules.generated.sklearn.ensemble.histgradientboostingclassifier#sklearn.ensemble.HistGradientBoostingClassifier.score |
set_params(**params) [source]
Set the parameters of this estimator. The method works on simple estimators as well as on nested objects (such as Pipeline). The latter have parameters of the form <component>__<parameter> so that it’s possible to update each component of a nested object. Parameters
**paramsdict
Es... | sklearn.modules.generated.sklearn.ensemble.histgradientboostingclassifier#sklearn.ensemble.HistGradientBoostingClassifier.set_params |
staged_decision_function(X) [source]
Compute decision function of X for each iteration. This method allows monitoring (i.e. determine error on testing set) after each stage. Parameters
Xarray-like of shape (n_samples, n_features)
The input samples. Yields
decisiongenerator of ndarray of shape (n_samples,)... | sklearn.modules.generated.sklearn.ensemble.histgradientboostingclassifier#sklearn.ensemble.HistGradientBoostingClassifier.staged_decision_function |
staged_predict(X) [source]
Predict classes at each iteration. This method allows monitoring (i.e. determine error on testing set) after each stage. New in version 0.24. Parameters
Xarray-like of shape (n_samples, n_features)
The input samples. Yields
ygenerator of ndarray of shape (n_samples,)
The pre... | sklearn.modules.generated.sklearn.ensemble.histgradientboostingclassifier#sklearn.ensemble.HistGradientBoostingClassifier.staged_predict |
staged_predict_proba(X) [source]
Predict class probabilities at each iteration. This method allows monitoring (i.e. determine error on testing set) after each stage. Parameters
Xarray-like of shape (n_samples, n_features)
The input samples. Yields
ygenerator of ndarray of shape (n_samples,)
The predicte... | sklearn.modules.generated.sklearn.ensemble.histgradientboostingclassifier#sklearn.ensemble.HistGradientBoostingClassifier.staged_predict_proba |
class sklearn.ensemble.HistGradientBoostingRegressor(loss='least_squares', *, learning_rate=0.1, max_iter=100, max_leaf_nodes=31, max_depth=None, min_samples_leaf=20, l2_regularization=0.0, max_bins=255, categorical_features=None, monotonic_cst=None, warm_start=False, early_stopping='auto', scoring='loss', validation_f... | sklearn.modules.generated.sklearn.ensemble.histgradientboostingregressor#sklearn.ensemble.HistGradientBoostingRegressor |
sklearn.ensemble.HistGradientBoostingRegressor
class sklearn.ensemble.HistGradientBoostingRegressor(loss='least_squares', *, learning_rate=0.1, max_iter=100, max_leaf_nodes=31, max_depth=None, min_samples_leaf=20, l2_regularization=0.0, max_bins=255, categorical_features=None, monotonic_cst=None, warm_start=False, ea... | sklearn.modules.generated.sklearn.ensemble.histgradientboostingregressor |
fit(X, y, sample_weight=None) [source]
Fit the gradient boosting model. Parameters
Xarray-like of shape (n_samples, n_features)
The input samples.
yarray-like of shape (n_samples,)
Target values.
sample_weightarray-like of shape (n_samples,) default=None
Weights of training data. New in version 0.23. ... | sklearn.modules.generated.sklearn.ensemble.histgradientboostingregressor#sklearn.ensemble.HistGradientBoostingRegressor.fit |
get_params(deep=True) [source]
Get parameters for this estimator. Parameters
deepbool, default=True
If True, will return the parameters for this estimator and contained subobjects that are estimators. Returns
paramsdict
Parameter names mapped to their values. | sklearn.modules.generated.sklearn.ensemble.histgradientboostingregressor#sklearn.ensemble.HistGradientBoostingRegressor.get_params |
predict(X) [source]
Predict values for X. Parameters
Xarray-like, shape (n_samples, n_features)
The input samples. Returns
yndarray, shape (n_samples,)
The predicted values. | sklearn.modules.generated.sklearn.ensemble.histgradientboostingregressor#sklearn.ensemble.HistGradientBoostingRegressor.predict |
score(X, y, sample_weight=None) [source]
Return the coefficient of determination \(R^2\) of the prediction. The coefficient \(R^2\) is defined as \((1 - \frac{u}{v})\), where \(u\) is the residual sum of squares ((y_true - y_pred)
** 2).sum() and \(v\) is the total sum of squares ((y_true -
y_true.mean()) ** 2).sum()... | sklearn.modules.generated.sklearn.ensemble.histgradientboostingregressor#sklearn.ensemble.HistGradientBoostingRegressor.score |
set_params(**params) [source]
Set the parameters of this estimator. The method works on simple estimators as well as on nested objects (such as Pipeline). The latter have parameters of the form <component>__<parameter> so that it’s possible to update each component of a nested object. Parameters
**paramsdict
Es... | sklearn.modules.generated.sklearn.ensemble.histgradientboostingregressor#sklearn.ensemble.HistGradientBoostingRegressor.set_params |
staged_predict(X) [source]
Predict regression target for each iteration This method allows monitoring (i.e. determine error on testing set) after each stage. New in version 0.24. Parameters
Xarray-like of shape (n_samples, n_features)
The input samples. Yields
ygenerator of ndarray of shape (n_samples,)... | sklearn.modules.generated.sklearn.ensemble.histgradientboostingregressor#sklearn.ensemble.HistGradientBoostingRegressor.staged_predict |
class sklearn.ensemble.IsolationForest(*, n_estimators=100, max_samples='auto', contamination='auto', max_features=1.0, bootstrap=False, n_jobs=None, random_state=None, verbose=0, warm_start=False) [source]
Isolation Forest Algorithm. Return the anomaly score of each sample using the IsolationForest algorithm The Iso... | sklearn.modules.generated.sklearn.ensemble.isolationforest#sklearn.ensemble.IsolationForest |
sklearn.ensemble.IsolationForest
class sklearn.ensemble.IsolationForest(*, n_estimators=100, max_samples='auto', contamination='auto', max_features=1.0, bootstrap=False, n_jobs=None, random_state=None, verbose=0, warm_start=False) [source]
Isolation Forest Algorithm. Return the anomaly score of each sample using th... | sklearn.modules.generated.sklearn.ensemble.isolationforest |
decision_function(X) [source]
Average anomaly score of X of the base classifiers. The anomaly score of an input sample is computed as the mean anomaly score of the trees in the forest. The measure of normality of an observation given a tree is the depth of the leaf containing this observation, which is equivalent to ... | sklearn.modules.generated.sklearn.ensemble.isolationforest#sklearn.ensemble.IsolationForest.decision_function |
property estimators_samples_
The subset of drawn samples for each base estimator. Returns a dynamically generated list of indices identifying the samples used for fitting each member of the ensemble, i.e., the in-bag samples. Note: the list is re-created at each call to the property in order to reduce the object memo... | sklearn.modules.generated.sklearn.ensemble.isolationforest#sklearn.ensemble.IsolationForest.estimators_samples_ |
fit(X, y=None, sample_weight=None) [source]
Fit estimator. Parameters
X{array-like, sparse matrix} of shape (n_samples, n_features)
The input samples. Use dtype=np.float32 for maximum efficiency. Sparse matrices are also supported, use sparse csc_matrix for maximum efficiency.
yIgnored
Not used, present for... | sklearn.modules.generated.sklearn.ensemble.isolationforest#sklearn.ensemble.IsolationForest.fit |
fit_predict(X, y=None) [source]
Perform fit on X and returns labels for X. Returns -1 for outliers and 1 for inliers. Parameters
X{array-like, sparse matrix, dataframe} of shape (n_samples, n_features)
yIgnored
Not used, present for API consistency by convention. Returns
yndarray of shape (n_samples,)
... | sklearn.modules.generated.sklearn.ensemble.isolationforest#sklearn.ensemble.IsolationForest.fit_predict |
get_params(deep=True) [source]
Get parameters for this estimator. Parameters
deepbool, default=True
If True, will return the parameters for this estimator and contained subobjects that are estimators. Returns
paramsdict
Parameter names mapped to their values. | sklearn.modules.generated.sklearn.ensemble.isolationforest#sklearn.ensemble.IsolationForest.get_params |
predict(X) [source]
Predict if a particular sample is an outlier or not. Parameters
X{array-like, sparse matrix} of 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. Returns
is_inlierndarray of s... | sklearn.modules.generated.sklearn.ensemble.isolationforest#sklearn.ensemble.IsolationForest.predict |
score_samples(X) [source]
Opposite of the anomaly score defined in the original paper. The anomaly score of an input sample is computed as the mean anomaly score of the trees in the forest. The measure of normality of an observation given a tree is the depth of the leaf containing this observation, which is equivalen... | sklearn.modules.generated.sklearn.ensemble.isolationforest#sklearn.ensemble.IsolationForest.score_samples |
set_params(**params) [source]
Set the parameters of this estimator. The method works on simple estimators as well as on nested objects (such as Pipeline). The latter have parameters of the form <component>__<parameter> so that it’s possible to update each component of a nested object. Parameters
**paramsdict
Es... | sklearn.modules.generated.sklearn.ensemble.isolationforest#sklearn.ensemble.IsolationForest.set_params |
class sklearn.ensemble.RandomForestClassifier(n_estimators=100, *, criterion='gini', max_depth=None, min_samples_split=2, min_samples_leaf=1, min_weight_fraction_leaf=0.0, max_features='auto', max_leaf_nodes=None, min_impurity_decrease=0.0, min_impurity_split=None, bootstrap=True, oob_score=False, n_jobs=None, random_s... | sklearn.modules.generated.sklearn.ensemble.randomforestclassifier#sklearn.ensemble.RandomForestClassifier |
sklearn.ensemble.RandomForestClassifier
class sklearn.ensemble.RandomForestClassifier(n_estimators=100, *, criterion='gini', max_depth=None, min_samples_split=2, min_samples_leaf=1, min_weight_fraction_leaf=0.0, max_features='auto', max_leaf_nodes=None, min_impurity_decrease=0.0, min_impurity_split=None, bootstrap=Tr... | sklearn.modules.generated.sklearn.ensemble.randomforestclassifier |
apply(X) [source]
Apply trees in the forest to X, return leaf indices. Parameters
X{array-like, sparse matrix} of 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 into a sparse csr_matrix. Return... | sklearn.modules.generated.sklearn.ensemble.randomforestclassifier#sklearn.ensemble.RandomForestClassifier.apply |
decision_path(X) [source]
Return the decision path in the forest. New in version 0.18. Parameters
X{array-like, sparse matrix} of 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 into a sparse csr... | sklearn.modules.generated.sklearn.ensemble.randomforestclassifier#sklearn.ensemble.RandomForestClassifier.decision_path |
property feature_importances_
The impurity-based feature importances. The higher, the more important the feature. The importance of a feature is computed as the (normalized) total reduction of the criterion brought by that feature. It is also known as the Gini importance. Warning: impurity-based feature importances c... | sklearn.modules.generated.sklearn.ensemble.randomforestclassifier#sklearn.ensemble.RandomForestClassifier.feature_importances_ |
fit(X, y, sample_weight=None) [source]
Build a forest of trees from the training set (X, y). Parameters
X{array-like, sparse matrix} of shape (n_samples, n_features)
The training input samples. Internally, its dtype will be converted to dtype=np.float32. If a sparse matrix is provided, it will be converted into... | sklearn.modules.generated.sklearn.ensemble.randomforestclassifier#sklearn.ensemble.RandomForestClassifier.fit |
get_params(deep=True) [source]
Get parameters for this estimator. Parameters
deepbool, default=True
If True, will return the parameters for this estimator and contained subobjects that are estimators. Returns
paramsdict
Parameter names mapped to their values. | sklearn.modules.generated.sklearn.ensemble.randomforestclassifier#sklearn.ensemble.RandomForestClassifier.get_params |
predict(X) [source]
Predict class for X. The predicted class of an input sample is a vote by the trees in the forest, weighted by their probability estimates. That is, the predicted class is the one with highest mean probability estimate across the trees. Parameters
X{array-like, sparse matrix} of shape (n_sample... | sklearn.modules.generated.sklearn.ensemble.randomforestclassifier#sklearn.ensemble.RandomForestClassifier.predict |
predict_log_proba(X) [source]
Predict class log-probabilities for X. The predicted class log-probabilities of an input sample is computed as the log of the mean predicted class probabilities of the trees in the forest. Parameters
X{array-like, sparse matrix} of shape (n_samples, n_features)
The input samples. I... | sklearn.modules.generated.sklearn.ensemble.randomforestclassifier#sklearn.ensemble.RandomForestClassifier.predict_log_proba |
predict_proba(X) [source]
Predict class probabilities for X. The predicted class probabilities of an input sample are computed as the mean predicted class probabilities of the trees in the forest. The class probability of a single tree is the fraction of samples of the same class in a leaf. Parameters
X{array-lik... | sklearn.modules.generated.sklearn.ensemble.randomforestclassifier#sklearn.ensemble.RandomForestClassifier.predict_proba |
score(X, y, sample_weight=None) [source]
Return the mean accuracy on the given test data and labels. In multi-label classification, this is the subset accuracy which is a harsh metric since you require for each sample that each label set be correctly predicted. Parameters
Xarray-like of shape (n_samples, n_featur... | sklearn.modules.generated.sklearn.ensemble.randomforestclassifier#sklearn.ensemble.RandomForestClassifier.score |
set_params(**params) [source]
Set the parameters of this estimator. The method works on simple estimators as well as on nested objects (such as Pipeline). The latter have parameters of the form <component>__<parameter> so that it’s possible to update each component of a nested object. Parameters
**paramsdict
Es... | sklearn.modules.generated.sklearn.ensemble.randomforestclassifier#sklearn.ensemble.RandomForestClassifier.set_params |
class sklearn.ensemble.RandomForestRegressor(n_estimators=100, *, criterion='mse', max_depth=None, min_samples_split=2, min_samples_leaf=1, min_weight_fraction_leaf=0.0, max_features='auto', max_leaf_nodes=None, min_impurity_decrease=0.0, min_impurity_split=None, bootstrap=True, oob_score=False, n_jobs=None, random_sta... | sklearn.modules.generated.sklearn.ensemble.randomforestregressor#sklearn.ensemble.RandomForestRegressor |
sklearn.ensemble.RandomForestRegressor
class sklearn.ensemble.RandomForestRegressor(n_estimators=100, *, criterion='mse', max_depth=None, min_samples_split=2, min_samples_leaf=1, min_weight_fraction_leaf=0.0, max_features='auto', max_leaf_nodes=None, min_impurity_decrease=0.0, min_impurity_split=None, bootstrap=True,... | sklearn.modules.generated.sklearn.ensemble.randomforestregressor |
apply(X) [source]
Apply trees in the forest to X, return leaf indices. Parameters
X{array-like, sparse matrix} of 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 into a sparse csr_matrix. Return... | sklearn.modules.generated.sklearn.ensemble.randomforestregressor#sklearn.ensemble.RandomForestRegressor.apply |
decision_path(X) [source]
Return the decision path in the forest. New in version 0.18. Parameters
X{array-like, sparse matrix} of 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 into a sparse csr... | sklearn.modules.generated.sklearn.ensemble.randomforestregressor#sklearn.ensemble.RandomForestRegressor.decision_path |
property feature_importances_
The impurity-based feature importances. The higher, the more important the feature. The importance of a feature is computed as the (normalized) total reduction of the criterion brought by that feature. It is also known as the Gini importance. Warning: impurity-based feature importances c... | sklearn.modules.generated.sklearn.ensemble.randomforestregressor#sklearn.ensemble.RandomForestRegressor.feature_importances_ |
fit(X, y, sample_weight=None) [source]
Build a forest of trees from the training set (X, y). Parameters
X{array-like, sparse matrix} of shape (n_samples, n_features)
The training input samples. Internally, its dtype will be converted to dtype=np.float32. If a sparse matrix is provided, it will be converted into... | sklearn.modules.generated.sklearn.ensemble.randomforestregressor#sklearn.ensemble.RandomForestRegressor.fit |
get_params(deep=True) [source]
Get parameters for this estimator. Parameters
deepbool, default=True
If True, will return the parameters for this estimator and contained subobjects that are estimators. Returns
paramsdict
Parameter names mapped to their values. | sklearn.modules.generated.sklearn.ensemble.randomforestregressor#sklearn.ensemble.RandomForestRegressor.get_params |
predict(X) [source]
Predict regression target for X. The predicted regression target of an input sample is computed as the mean predicted regression targets of the trees in the forest. Parameters
X{array-like, sparse matrix} of shape (n_samples, n_features)
The input samples. Internally, its dtype will be conve... | sklearn.modules.generated.sklearn.ensemble.randomforestregressor#sklearn.ensemble.RandomForestRegressor.predict |
score(X, y, sample_weight=None) [source]
Return the coefficient of determination \(R^2\) of the prediction. The coefficient \(R^2\) is defined as \((1 - \frac{u}{v})\), where \(u\) is the residual sum of squares ((y_true - y_pred)
** 2).sum() and \(v\) is the total sum of squares ((y_true -
y_true.mean()) ** 2).sum()... | sklearn.modules.generated.sklearn.ensemble.randomforestregressor#sklearn.ensemble.RandomForestRegressor.score |
set_params(**params) [source]
Set the parameters of this estimator. The method works on simple estimators as well as on nested objects (such as Pipeline). The latter have parameters of the form <component>__<parameter> so that it’s possible to update each component of a nested object. Parameters
**paramsdict
Es... | sklearn.modules.generated.sklearn.ensemble.randomforestregressor#sklearn.ensemble.RandomForestRegressor.set_params |
class sklearn.ensemble.RandomTreesEmbedding(n_estimators=100, *, max_depth=5, min_samples_split=2, min_samples_leaf=1, min_weight_fraction_leaf=0.0, max_leaf_nodes=None, min_impurity_decrease=0.0, min_impurity_split=None, sparse_output=True, n_jobs=None, random_state=None, verbose=0, warm_start=False) [source]
An ens... | sklearn.modules.generated.sklearn.ensemble.randomtreesembedding#sklearn.ensemble.RandomTreesEmbedding |
sklearn.ensemble.RandomTreesEmbedding
class sklearn.ensemble.RandomTreesEmbedding(n_estimators=100, *, max_depth=5, min_samples_split=2, min_samples_leaf=1, min_weight_fraction_leaf=0.0, max_leaf_nodes=None, min_impurity_decrease=0.0, min_impurity_split=None, sparse_output=True, n_jobs=None, random_state=None, verbos... | sklearn.modules.generated.sklearn.ensemble.randomtreesembedding |
apply(X) [source]
Apply trees in the forest to X, return leaf indices. Parameters
X{array-like, sparse matrix} of 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 into a sparse csr_matrix. Return... | sklearn.modules.generated.sklearn.ensemble.randomtreesembedding#sklearn.ensemble.RandomTreesEmbedding.apply |
decision_path(X) [source]
Return the decision path in the forest. New in version 0.18. Parameters
X{array-like, sparse matrix} of 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 into a sparse csr... | sklearn.modules.generated.sklearn.ensemble.randomtreesembedding#sklearn.ensemble.RandomTreesEmbedding.decision_path |
property feature_importances_
The impurity-based feature importances. The higher, the more important the feature. The importance of a feature is computed as the (normalized) total reduction of the criterion brought by that feature. It is also known as the Gini importance. Warning: impurity-based feature importances c... | sklearn.modules.generated.sklearn.ensemble.randomtreesembedding#sklearn.ensemble.RandomTreesEmbedding.feature_importances_ |
fit(X, y=None, sample_weight=None) [source]
Fit estimator. Parameters
X{array-like, sparse matrix} of shape (n_samples, n_features)
The input samples. Use dtype=np.float32 for maximum efficiency. Sparse matrices are also supported, use sparse csc_matrix for maximum efficiency.
yIgnored
Not used, present for... | sklearn.modules.generated.sklearn.ensemble.randomtreesembedding#sklearn.ensemble.RandomTreesEmbedding.fit |
fit_transform(X, y=None, sample_weight=None) [source]
Fit estimator and transform dataset. Parameters
X{array-like, sparse matrix} of shape (n_samples, n_features)
Input data used to build forests. Use dtype=np.float32 for maximum efficiency.
yIgnored
Not used, present for API consistency by convention.
s... | sklearn.modules.generated.sklearn.ensemble.randomtreesembedding#sklearn.ensemble.RandomTreesEmbedding.fit_transform |
get_params(deep=True) [source]
Get parameters for this estimator. Parameters
deepbool, default=True
If True, will return the parameters for this estimator and contained subobjects that are estimators. Returns
paramsdict
Parameter names mapped to their values. | sklearn.modules.generated.sklearn.ensemble.randomtreesembedding#sklearn.ensemble.RandomTreesEmbedding.get_params |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.