doc_content
stringlengths
1
386k
doc_id
stringlengths
5
188
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.decomposition.sparsepca#sklearn.decomposition.SparsePCA.set_params
transform(X) [source] Least Squares projection of the data onto the sparse components. To avoid instability issues in case the system is under-determined, regularization can be applied (Ridge regression) via the ridge_alpha parameter. Note that Sparse PCA components orthogonality is not enforced as in PCA hence one c...
sklearn.modules.generated.sklearn.decomposition.sparsepca#sklearn.decomposition.SparsePCA.transform
sklearn.decomposition.sparse_encode(X, dictionary, *, gram=None, cov=None, algorithm='lasso_lars', n_nonzero_coefs=None, alpha=None, copy_cov=True, init=None, max_iter=1000, n_jobs=None, check_input=True, verbose=0, positive=False) [source] Sparse coding Each row of the result is the solution to a sparse coding probl...
sklearn.modules.generated.sklearn.decomposition.sparse_encode#sklearn.decomposition.sparse_encode
class sklearn.decomposition.TruncatedSVD(n_components=2, *, algorithm='randomized', n_iter=5, random_state=None, tol=0.0) [source] Dimensionality reduction using truncated SVD (aka LSA). This transformer performs linear dimensionality reduction by means of truncated singular value decomposition (SVD). Contrary to PCA...
sklearn.modules.generated.sklearn.decomposition.truncatedsvd#sklearn.decomposition.TruncatedSVD
sklearn.decomposition.TruncatedSVD class sklearn.decomposition.TruncatedSVD(n_components=2, *, algorithm='randomized', n_iter=5, random_state=None, tol=0.0) [source] Dimensionality reduction using truncated SVD (aka LSA). This transformer performs linear dimensionality reduction by means of truncated singular value...
sklearn.modules.generated.sklearn.decomposition.truncatedsvd
fit(X, y=None) [source] Fit model on training data X. Parameters X{array-like, sparse matrix} of shape (n_samples, n_features) Training data. yIgnored Returns selfobject Returns the transformer object.
sklearn.modules.generated.sklearn.decomposition.truncatedsvd#sklearn.decomposition.TruncatedSVD.fit
fit_transform(X, y=None) [source] Fit model to X and perform dimensionality reduction on X. Parameters X{array-like, sparse matrix} of shape (n_samples, n_features) Training data. yIgnored Returns X_newndarray of shape (n_samples, n_components) Reduced version of X. This will always be a dense array.
sklearn.modules.generated.sklearn.decomposition.truncatedsvd#sklearn.decomposition.TruncatedSVD.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.decomposition.truncatedsvd#sklearn.decomposition.TruncatedSVD.get_params
inverse_transform(X) [source] Transform X back to its original space. Returns an array X_original whose transform would be X. Parameters Xarray-like of shape (n_samples, n_components) New data. Returns X_originalndarray of shape (n_samples, n_features) Note that this is always a dense array.
sklearn.modules.generated.sklearn.decomposition.truncatedsvd#sklearn.decomposition.TruncatedSVD.inverse_transform
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.decomposition.truncatedsvd#sklearn.decomposition.TruncatedSVD.set_params
transform(X) [source] Perform dimensionality reduction on X. Parameters X{array-like, sparse matrix} of shape (n_samples, n_features) New data. Returns X_newndarray of shape (n_samples, n_components) Reduced version of X. This will always be a dense array.
sklearn.modules.generated.sklearn.decomposition.truncatedsvd#sklearn.decomposition.TruncatedSVD.transform
class sklearn.discriminant_analysis.LinearDiscriminantAnalysis(solver='svd', shrinkage=None, priors=None, n_components=None, store_covariance=False, tol=0.0001, covariance_estimator=None) [source] Linear Discriminant Analysis A classifier with a linear decision boundary, generated by fitting class conditional densiti...
sklearn.modules.generated.sklearn.discriminant_analysis.lineardiscriminantanalysis#sklearn.discriminant_analysis.LinearDiscriminantAnalysis
sklearn.discriminant_analysis.LinearDiscriminantAnalysis class sklearn.discriminant_analysis.LinearDiscriminantAnalysis(solver='svd', shrinkage=None, priors=None, n_components=None, store_covariance=False, tol=0.0001, covariance_estimator=None) [source] Linear Discriminant Analysis A classifier with a linear decisi...
sklearn.modules.generated.sklearn.discriminant_analysis.lineardiscriminantanalysis
decision_function(X) [source] Apply decision function to an array of samples. The decision function is equal (up to a constant factor) to the log-posterior of the model, i.e. log p(y = k | x). In a binary classification setting this instead corresponds to the difference log p(y = 1 | x) - log p(y = 0 | x). See Mathem...
sklearn.modules.generated.sklearn.discriminant_analysis.lineardiscriminantanalysis#sklearn.discriminant_analysis.LinearDiscriminantAnalysis.decision_function
fit(X, y) [source] Fit LinearDiscriminantAnalysis model according to the given training data and parameters. Changed in version 0.19: store_covariance has been moved to main constructor. Changed in version 0.19: tol has been moved to main constructor. Parameters Xarray-like of shape (n_samples, n_features...
sklearn.modules.generated.sklearn.discriminant_analysis.lineardiscriminantanalysis#sklearn.discriminant_analysis.LinearDiscriminantAnalysis.fit
fit_transform(X, y=None, **fit_params) [source] 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 Xarray-like of shape (n_samples, n_features) Input samples. yarray-like of shape (n_samples,) or (n_samples, n_outp...
sklearn.modules.generated.sklearn.discriminant_analysis.lineardiscriminantanalysis#sklearn.discriminant_analysis.LinearDiscriminantAnalysis.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.discriminant_analysis.lineardiscriminantanalysis#sklearn.discriminant_analysis.LinearDiscriminantAnalysis.get_params
predict(X) [source] Predict class labels for samples in X. Parameters Xarray-like or sparse matrix, shape (n_samples, n_features) Samples. Returns Carray, shape [n_samples] Predicted class label per sample.
sklearn.modules.generated.sklearn.discriminant_analysis.lineardiscriminantanalysis#sklearn.discriminant_analysis.LinearDiscriminantAnalysis.predict
predict_log_proba(X) [source] Estimate log probability. Parameters Xarray-like of shape (n_samples, n_features) Input data. Returns Cndarray of shape (n_samples, n_classes) Estimated log probabilities.
sklearn.modules.generated.sklearn.discriminant_analysis.lineardiscriminantanalysis#sklearn.discriminant_analysis.LinearDiscriminantAnalysis.predict_log_proba
predict_proba(X) [source] Estimate probability. Parameters Xarray-like of shape (n_samples, n_features) Input data. Returns Cndarray of shape (n_samples, n_classes) Estimated probabilities.
sklearn.modules.generated.sklearn.discriminant_analysis.lineardiscriminantanalysis#sklearn.discriminant_analysis.LinearDiscriminantAnalysis.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.discriminant_analysis.lineardiscriminantanalysis#sklearn.discriminant_analysis.LinearDiscriminantAnalysis.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.discriminant_analysis.lineardiscriminantanalysis#sklearn.discriminant_analysis.LinearDiscriminantAnalysis.set_params
transform(X) [source] Project data to maximize class separation. Parameters Xarray-like of shape (n_samples, n_features) Input data. Returns X_newndarray of shape (n_samples, n_components) Transformed data.
sklearn.modules.generated.sklearn.discriminant_analysis.lineardiscriminantanalysis#sklearn.discriminant_analysis.LinearDiscriminantAnalysis.transform
class sklearn.discriminant_analysis.QuadraticDiscriminantAnalysis(*, priors=None, reg_param=0.0, store_covariance=False, tol=0.0001) [source] Quadratic Discriminant Analysis A classifier with a quadratic decision boundary, generated by fitting class conditional densities to the data and using Bayes’ rule. The model f...
sklearn.modules.generated.sklearn.discriminant_analysis.quadraticdiscriminantanalysis#sklearn.discriminant_analysis.QuadraticDiscriminantAnalysis
sklearn.discriminant_analysis.QuadraticDiscriminantAnalysis class sklearn.discriminant_analysis.QuadraticDiscriminantAnalysis(*, priors=None, reg_param=0.0, store_covariance=False, tol=0.0001) [source] Quadratic Discriminant Analysis A classifier with a quadratic decision boundary, generated by fitting class condit...
sklearn.modules.generated.sklearn.discriminant_analysis.quadraticdiscriminantanalysis
decision_function(X) [source] Apply decision function to an array of samples. The decision function is equal (up to a constant factor) to the log-posterior of the model, i.e. log p(y = k | x). In a binary classification setting this instead corresponds to the difference log p(y = 1 | x) - log p(y = 0 | x). See Mathem...
sklearn.modules.generated.sklearn.discriminant_analysis.quadraticdiscriminantanalysis#sklearn.discriminant_analysis.QuadraticDiscriminantAnalysis.decision_function
fit(X, y) [source] Fit the model according to the given training data and parameters. Changed in version 0.19: store_covariances has been moved to main constructor as store_covariance Changed in version 0.19: tol has been moved to main constructor. Parameters Xarray-like of shape (n_samples, n_features) Tra...
sklearn.modules.generated.sklearn.discriminant_analysis.quadraticdiscriminantanalysis#sklearn.discriminant_analysis.QuadraticDiscriminantAnalysis.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.discriminant_analysis.quadraticdiscriminantanalysis#sklearn.discriminant_analysis.QuadraticDiscriminantAnalysis.get_params
predict(X) [source] Perform classification on an array of test vectors X. The predicted class C for each sample in X is returned. Parameters Xarray-like of shape (n_samples, n_features) Returns Cndarray of shape (n_samples,)
sklearn.modules.generated.sklearn.discriminant_analysis.quadraticdiscriminantanalysis#sklearn.discriminant_analysis.QuadraticDiscriminantAnalysis.predict
predict_log_proba(X) [source] Return log of posterior probabilities of classification. Parameters Xarray-like of shape (n_samples, n_features) Array of samples/test vectors. Returns Cndarray of shape (n_samples, n_classes) Posterior log-probabilities of classification per class.
sklearn.modules.generated.sklearn.discriminant_analysis.quadraticdiscriminantanalysis#sklearn.discriminant_analysis.QuadraticDiscriminantAnalysis.predict_log_proba
predict_proba(X) [source] Return posterior probabilities of classification. Parameters Xarray-like of shape (n_samples, n_features) Array of samples/test vectors. Returns Cndarray of shape (n_samples, n_classes) Posterior probabilities of classification per class.
sklearn.modules.generated.sklearn.discriminant_analysis.quadraticdiscriminantanalysis#sklearn.discriminant_analysis.QuadraticDiscriminantAnalysis.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.discriminant_analysis.quadraticdiscriminantanalysis#sklearn.discriminant_analysis.QuadraticDiscriminantAnalysis.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.discriminant_analysis.quadraticdiscriminantanalysis#sklearn.discriminant_analysis.QuadraticDiscriminantAnalysis.set_params
class sklearn.dummy.DummyClassifier(*, strategy='prior', random_state=None, constant=None) [source] DummyClassifier is a classifier that makes predictions using simple rules. This classifier is useful as a simple baseline to compare with other (real) classifiers. Do not use it for real problems. Read more in the User...
sklearn.modules.generated.sklearn.dummy.dummyclassifier#sklearn.dummy.DummyClassifier
sklearn.dummy.DummyClassifier class sklearn.dummy.DummyClassifier(*, strategy='prior', random_state=None, constant=None) [source] DummyClassifier is a classifier that makes predictions using simple rules. This classifier is useful as a simple baseline to compare with other (real) classifiers. Do not use it for real...
sklearn.modules.generated.sklearn.dummy.dummyclassifier
fit(X, y, sample_weight=None) [source] Fit the random classifier. Parameters Xarray-like of shape (n_samples, n_features) Training data. yarray-like of shape (n_samples,) or (n_samples, n_outputs) Target values. sample_weightarray-like of shape (n_samples,), default=None Sample weights. Returns se...
sklearn.modules.generated.sklearn.dummy.dummyclassifier#sklearn.dummy.DummyClassifier.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.dummy.dummyclassifier#sklearn.dummy.DummyClassifier.get_params
predict(X) [source] Perform classification on test vectors X. Parameters Xarray-like of shape (n_samples, n_features) Test data. Returns yarray-like of shape (n_samples,) or (n_samples, n_outputs) Predicted target values for X.
sklearn.modules.generated.sklearn.dummy.dummyclassifier#sklearn.dummy.DummyClassifier.predict
predict_log_proba(X) [source] Return log probability estimates for the test vectors X. Parameters X{array-like, object with finite length or shape} Training data, requires length = n_samples Returns Pndarray of shape (n_samples, n_classes) or list of such arrays Returns the log probability of the sample...
sklearn.modules.generated.sklearn.dummy.dummyclassifier#sklearn.dummy.DummyClassifier.predict_log_proba
predict_proba(X) [source] Return probability estimates for the test vectors X. Parameters Xarray-like of shape (n_samples, n_features) Test data. Returns Pndarray of shape (n_samples, n_classes) or list of such arrays Returns the probability of the sample for each class in the model, where classes are o...
sklearn.modules.generated.sklearn.dummy.dummyclassifier#sklearn.dummy.DummyClassifier.predict_proba
score(X, y, sample_weight=None) [source] Returns 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 XNone or array-like of shape (n_samples,...
sklearn.modules.generated.sklearn.dummy.dummyclassifier#sklearn.dummy.DummyClassifier.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.dummy.dummyclassifier#sklearn.dummy.DummyClassifier.set_params
class sklearn.dummy.DummyRegressor(*, strategy='mean', constant=None, quantile=None) [source] DummyRegressor is a regressor that makes predictions using simple rules. This regressor is useful as a simple baseline to compare with other (real) regressors. Do not use it for real problems. Read more in the User Guide. N...
sklearn.modules.generated.sklearn.dummy.dummyregressor#sklearn.dummy.DummyRegressor
sklearn.dummy.DummyRegressor class sklearn.dummy.DummyRegressor(*, strategy='mean', constant=None, quantile=None) [source] DummyRegressor is a regressor that makes predictions using simple rules. This regressor is useful as a simple baseline to compare with other (real) regressors. Do not use it for real problems. ...
sklearn.modules.generated.sklearn.dummy.dummyregressor
fit(X, y, sample_weight=None) [source] Fit the random regressor. Parameters Xarray-like of shape (n_samples, n_features) Training data. yarray-like of shape (n_samples,) or (n_samples, n_outputs) Target values. sample_weightarray-like of shape (n_samples,), default=None Sample weights. Returns sel...
sklearn.modules.generated.sklearn.dummy.dummyregressor#sklearn.dummy.DummyRegressor.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.dummy.dummyregressor#sklearn.dummy.DummyRegressor.get_params
predict(X, return_std=False) [source] Perform classification on test vectors X. Parameters Xarray-like of shape (n_samples, n_features) Test data. return_stdbool, default=False Whether to return the standard deviation of posterior prediction. All zeros in this case. New in version 0.20. Returns yarr...
sklearn.modules.generated.sklearn.dummy.dummyregressor#sklearn.dummy.DummyRegressor.predict
score(X, y, sample_weight=None) [source] Returns the coefficient of determination R^2 of the prediction. The coefficient R^2 is defined as (1 - 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(). The best possible score i...
sklearn.modules.generated.sklearn.dummy.dummyregressor#sklearn.dummy.DummyRegressor.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.dummy.dummyregressor#sklearn.dummy.DummyRegressor.set_params
class sklearn.ensemble.AdaBoostClassifier(base_estimator=None, *, n_estimators=50, learning_rate=1.0, algorithm='SAMME.R', random_state=None) [source] An AdaBoost classifier. An AdaBoost [1] classifier is a meta-estimator that begins by fitting a classifier on the original dataset and then fits additional copies of t...
sklearn.modules.generated.sklearn.ensemble.adaboostclassifier#sklearn.ensemble.AdaBoostClassifier
sklearn.ensemble.AdaBoostClassifier class sklearn.ensemble.AdaBoostClassifier(base_estimator=None, *, n_estimators=50, learning_rate=1.0, algorithm='SAMME.R', random_state=None) [source] An AdaBoost classifier. An AdaBoost [1] classifier is a meta-estimator that begins by fitting a classifier on the original datase...
sklearn.modules.generated.sklearn.ensemble.adaboostclassifier
decision_function(X) [source] Compute the decision function of X. Parameters X{array-like, sparse matrix} of shape (n_samples, n_features) The training input samples. Sparse matrix can be CSC, CSR, COO, DOK, or LIL. COO, DOK, and LIL are converted to CSR. Returns scorendarray of shape of (n_samples, k) ...
sklearn.modules.generated.sklearn.ensemble.adaboostclassifier#sklearn.ensemble.AdaBoostClassifier.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.adaboostclassifier#sklearn.ensemble.AdaBoostClassifier.feature_importances_
fit(X, y, sample_weight=None) [source] Build a boosted classifier from the training set (X, y). Parameters X{array-like, sparse matrix} of shape (n_samples, n_features) The training input samples. Sparse matrix can be CSC, CSR, COO, DOK, or LIL. COO, DOK, and LIL are converted to CSR. yarray-like of shape (n_...
sklearn.modules.generated.sklearn.ensemble.adaboostclassifier#sklearn.ensemble.AdaBoostClassifier.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.adaboostclassifier#sklearn.ensemble.AdaBoostClassifier.get_params
predict(X) [source] Predict classes for X. The predicted class of an input sample is computed as the weighted mean prediction of the classifiers in the ensemble. Parameters X{array-like, sparse matrix} of shape (n_samples, n_features) The training input samples. Sparse matrix can be CSC, CSR, COO, DOK, or LIL. ...
sklearn.modules.generated.sklearn.ensemble.adaboostclassifier#sklearn.ensemble.AdaBoostClassifier.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 weighted mean predicted class log-probabilities of the classifiers in the ensemble. Parameters X{array-like, sparse matrix} of shape (n_samples, n_features) The traini...
sklearn.modules.generated.sklearn.ensemble.adaboostclassifier#sklearn.ensemble.AdaBoostClassifier.predict_log_proba
predict_proba(X) [source] Predict class probabilities for X. The predicted class probabilities of an input sample is computed as the weighted mean predicted class probabilities of the classifiers in the ensemble. Parameters X{array-like, sparse matrix} of shape (n_samples, n_features) The training input samples...
sklearn.modules.generated.sklearn.ensemble.adaboostclassifier#sklearn.ensemble.AdaBoostClassifier.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.adaboostclassifier#sklearn.ensemble.AdaBoostClassifier.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.adaboostclassifier#sklearn.ensemble.AdaBoostClassifier.set_params
staged_decision_function(X) [source] Compute decision function of X for each boosting iteration. This method allows monitoring (i.e. determine error on testing set) after each boosting iteration. Parameters X{array-like, sparse matrix} of shape (n_samples, n_features) The training input samples. Sparse matrix c...
sklearn.modules.generated.sklearn.ensemble.adaboostclassifier#sklearn.ensemble.AdaBoostClassifier.staged_decision_function
staged_predict(X) [source] Return staged predictions for X. The predicted class of an input sample is computed as the weighted mean prediction of the classifiers in the ensemble. This generator method yields the ensemble prediction after each iteration of boosting and therefore allows monitoring, such as to determine...
sklearn.modules.generated.sklearn.ensemble.adaboostclassifier#sklearn.ensemble.AdaBoostClassifier.staged_predict
staged_predict_proba(X) [source] Predict class probabilities for X. The predicted class probabilities of an input sample is computed as the weighted mean predicted class probabilities of the classifiers in the ensemble. This generator method yields the ensemble predicted class probabilities after each iteration of bo...
sklearn.modules.generated.sklearn.ensemble.adaboostclassifier#sklearn.ensemble.AdaBoostClassifier.staged_predict_proba
staged_score(X, y, sample_weight=None) [source] Return staged scores for X, y. This generator method yields the ensemble score after each iteration of boosting and therefore allows monitoring, such as to determine the score on a test set after each boost. Parameters X{array-like, sparse matrix} of shape (n_sample...
sklearn.modules.generated.sklearn.ensemble.adaboostclassifier#sklearn.ensemble.AdaBoostClassifier.staged_score
class sklearn.ensemble.AdaBoostRegressor(base_estimator=None, *, n_estimators=50, learning_rate=1.0, loss='linear', random_state=None) [source] An AdaBoost regressor. An AdaBoost [1] regressor is a meta-estimator that begins by fitting a regressor on the original dataset and then fits additional copies of the regress...
sklearn.modules.generated.sklearn.ensemble.adaboostregressor#sklearn.ensemble.AdaBoostRegressor
sklearn.ensemble.AdaBoostRegressor class sklearn.ensemble.AdaBoostRegressor(base_estimator=None, *, n_estimators=50, learning_rate=1.0, loss='linear', random_state=None) [source] An AdaBoost regressor. An AdaBoost [1] regressor is a meta-estimator that begins by fitting a regressor on the original dataset and then ...
sklearn.modules.generated.sklearn.ensemble.adaboostregressor
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.adaboostregressor#sklearn.ensemble.AdaBoostRegressor.feature_importances_
fit(X, y, sample_weight=None) [source] Build a boosted regressor from the training set (X, y). Parameters X{array-like, sparse matrix} of shape (n_samples, n_features) The training input samples. Sparse matrix can be CSC, CSR, COO, DOK, or LIL. COO, DOK, and LIL are converted to CSR. yarray-like of shape (n_s...
sklearn.modules.generated.sklearn.ensemble.adaboostregressor#sklearn.ensemble.AdaBoostRegressor.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.adaboostregressor#sklearn.ensemble.AdaBoostRegressor.get_params
predict(X) [source] Predict regression value for X. The predicted regression value of an input sample is computed as the weighted median prediction of the classifiers in the ensemble. Parameters X{array-like, sparse matrix} of shape (n_samples, n_features) The training input samples. Sparse matrix can be CSC, C...
sklearn.modules.generated.sklearn.ensemble.adaboostregressor#sklearn.ensemble.AdaBoostRegressor.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.adaboostregressor#sklearn.ensemble.AdaBoostRegressor.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.adaboostregressor#sklearn.ensemble.AdaBoostRegressor.set_params
staged_predict(X) [source] Return staged predictions for X. The predicted regression value of an input sample is computed as the weighted median prediction of the classifiers in the ensemble. This generator method yields the ensemble prediction after each iteration of boosting and therefore allows monitoring, such as...
sklearn.modules.generated.sklearn.ensemble.adaboostregressor#sklearn.ensemble.AdaBoostRegressor.staged_predict
staged_score(X, y, sample_weight=None) [source] Return staged scores for X, y. This generator method yields the ensemble score after each iteration of boosting and therefore allows monitoring, such as to determine the score on a test set after each boost. Parameters X{array-like, sparse matrix} of shape (n_sample...
sklearn.modules.generated.sklearn.ensemble.adaboostregressor#sklearn.ensemble.AdaBoostRegressor.staged_score
class sklearn.ensemble.BaggingClassifier(base_estimator=None, n_estimators=10, *, max_samples=1.0, max_features=1.0, bootstrap=True, bootstrap_features=False, oob_score=False, warm_start=False, n_jobs=None, random_state=None, verbose=0) [source] A Bagging classifier. A Bagging classifier is an ensemble meta-estimator...
sklearn.modules.generated.sklearn.ensemble.baggingclassifier#sklearn.ensemble.BaggingClassifier
sklearn.ensemble.BaggingClassifier class sklearn.ensemble.BaggingClassifier(base_estimator=None, n_estimators=10, *, max_samples=1.0, max_features=1.0, bootstrap=True, bootstrap_features=False, oob_score=False, warm_start=False, n_jobs=None, random_state=None, verbose=0) [source] A Bagging classifier. A Bagging cla...
sklearn.modules.generated.sklearn.ensemble.baggingclassifier
decision_function(X) [source] Average of the decision functions of the base classifiers. Parameters X{array-like, sparse matrix} of shape (n_samples, n_features) The training input samples. Sparse matrices are accepted only if they are supported by the base estimator. Returns scorendarray of shape (n_samp...
sklearn.modules.generated.sklearn.ensemble.baggingclassifier#sklearn.ensemble.BaggingClassifier.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.baggingclassifier#sklearn.ensemble.BaggingClassifier.estimators_samples_
fit(X, y, sample_weight=None) [source] Build a Bagging ensemble of estimators from the training set (X, y). Parameters X{array-like, sparse matrix} of shape (n_samples, n_features) The training input samples. Sparse matrices are accepted only if they are supported by the base estimator. yarray-like of sha...
sklearn.modules.generated.sklearn.ensemble.baggingclassifier#sklearn.ensemble.BaggingClassifier.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.baggingclassifier#sklearn.ensemble.BaggingClassifier.get_params
predict(X) [source] Predict class for X. The predicted class of an input sample is computed as the class with the highest mean predicted probability. If base estimators do not implement a predict_proba method, then it resorts to voting. Parameters X{array-like, sparse matrix} of shape (n_samples, n_features) Th...
sklearn.modules.generated.sklearn.ensemble.baggingclassifier#sklearn.ensemble.BaggingClassifier.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 base estimators in the ensemble. Parameters X{array-like, sparse matrix} of shape (n_samples, n_features) The trai...
sklearn.modules.generated.sklearn.ensemble.baggingclassifier#sklearn.ensemble.BaggingClassifier.predict_log_proba
predict_proba(X) [source] Predict class probabilities for X. The predicted class probabilities of an input sample is computed as the mean predicted class probabilities of the base estimators in the ensemble. If base estimators do not implement a predict_proba method, then it resorts to voting and the predicted class ...
sklearn.modules.generated.sklearn.ensemble.baggingclassifier#sklearn.ensemble.BaggingClassifier.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.baggingclassifier#sklearn.ensemble.BaggingClassifier.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.baggingclassifier#sklearn.ensemble.BaggingClassifier.set_params
class sklearn.ensemble.BaggingRegressor(base_estimator=None, n_estimators=10, *, max_samples=1.0, max_features=1.0, bootstrap=True, bootstrap_features=False, oob_score=False, warm_start=False, n_jobs=None, random_state=None, verbose=0) [source] A Bagging regressor. A Bagging regressor is an ensemble meta-estimator th...
sklearn.modules.generated.sklearn.ensemble.baggingregressor#sklearn.ensemble.BaggingRegressor
sklearn.ensemble.BaggingRegressor class sklearn.ensemble.BaggingRegressor(base_estimator=None, n_estimators=10, *, max_samples=1.0, max_features=1.0, bootstrap=True, bootstrap_features=False, oob_score=False, warm_start=False, n_jobs=None, random_state=None, verbose=0) [source] A Bagging regressor. A Bagging regres...
sklearn.modules.generated.sklearn.ensemble.baggingregressor
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.baggingregressor#sklearn.ensemble.BaggingRegressor.estimators_samples_
fit(X, y, sample_weight=None) [source] Build a Bagging ensemble of estimators from the training set (X, y). Parameters X{array-like, sparse matrix} of shape (n_samples, n_features) The training input samples. Sparse matrices are accepted only if they are supported by the base estimator. yarray-like of sha...
sklearn.modules.generated.sklearn.ensemble.baggingregressor#sklearn.ensemble.BaggingRegressor.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.baggingregressor#sklearn.ensemble.BaggingRegressor.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 estimators in the ensemble. Parameters X{array-like, sparse matrix} of shape (n_samples, n_features) The training input samples. Sparse matrices are...
sklearn.modules.generated.sklearn.ensemble.baggingregressor#sklearn.ensemble.BaggingRegressor.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.baggingregressor#sklearn.ensemble.BaggingRegressor.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.baggingregressor#sklearn.ensemble.BaggingRegressor.set_params
class sklearn.ensemble.ExtraTreesClassifier(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=False, oob_score=False, n_jobs=None, random_st...
sklearn.modules.generated.sklearn.ensemble.extratreesclassifier#sklearn.ensemble.ExtraTreesClassifier
sklearn.ensemble.ExtraTreesClassifier class sklearn.ensemble.ExtraTreesClassifier(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=False,...
sklearn.modules.generated.sklearn.ensemble.extratreesclassifier
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.extratreesclassifier#sklearn.ensemble.ExtraTreesClassifier.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.extratreesclassifier#sklearn.ensemble.ExtraTreesClassifier.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.extratreesclassifier#sklearn.ensemble.ExtraTreesClassifier.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.extratreesclassifier#sklearn.ensemble.ExtraTreesClassifier.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.extratreesclassifier#sklearn.ensemble.ExtraTreesClassifier.get_params