Flow
TEST85c6e50172sklearn.ensemble._bagging.BaggingClassifier(estimator=sklearn.ensemble._bagging.BaggingClassifier(estimator=sklearn.tree._classes.DecisionTreeClassifier))

TEST85c6e50172sklearn.ensemble._bagging.BaggingClassifier(estimator=sklearn.ensemble._bagging.BaggingClassifier(estimator=sklearn.tree._classes.DecisionTreeClassifier))

Visibility: public Uploaded 17-10-2024 by Continuous Integration sklearn==1.4.2 numpy>=1.19.5 scipy>=1.6.0 joblib>=1.2.0 threadpoolctl>=2.0.0 0 runs
0 likes downloaded by 0 people 0 issues 0 downvotes , 0 total downloads
  • openml-python python scikit-learn sklearn sklearn_1.4.2
Issue #Downvotes for this reason By


Loading wiki
Help us complete this description Edit
A Bagging classifier. A Bagging classifier is an ensemble meta-estimator that fits base classifiers each on random subsets of the original dataset and then aggregate their individual predictions (either by voting or by averaging) to form a final prediction. Such a meta-estimator can typically be used as a way to reduce the variance of a black-box estimator (e.g., a decision tree), by introducing randomization into its construction procedure and then making an ensemble out of it. This algorithm encompasses several works from the literature. When random subsets of the dataset are drawn as random subsets of the samples, then this algorithm is known as Pasting [1]_. If samples are drawn with replacement, then the method is known as Bagging [2]_. When random subsets of the dataset are drawn as random subsets of the features, then the method is known as Random Subspaces [3]_. Finally, when base estimators are built on subsets of both samples and features, then the method is known as Random Patches [4]_.

Components

estimatorTEST85c6e50172sklearn.ensemble._bagging.BaggingClassifier(estimator=sklearn.tree._classes.DecisionTreeClassifier)(1)The base estimator to fit on random subsets of the dataset If None, then the base estimator is a :class:`~sklearn.tree.DecisionTreeClassifier` .. versionadded:: 1.2 `base_estimator` was renamed to `estimator`

Parameters

bootstrapWhether samples are drawn with replacement. If False, sampling without replacement is performeddefault: true
bootstrap_featuresWhether features are drawn with replacementdefault: false
estimatorThe base estimator to fit on random subsets of the dataset If None, then the base estimator is a :class:`~sklearn.tree.DecisionTreeClassifier` .. versionadded:: 1.2 `base_estimator` was renamed to `estimator`default: {"oml-python:serialized_object": "component_reference", "value": {"key": "estimator", "step_name": null}}
max_featuresThe number of features to draw from X to train each base estimator ( without replacement by default, see `bootstrap_features` for more details) - If int, then draw `max_features` features - If float, then draw `max(1, int(max_features * n_features_in_))` featuresdefault: 1.0
max_samplesThe number of samples to draw from X to train each base estimator (with replacement by default, see `bootstrap` for more details) - If int, then draw `max_samples` samples - If float, then draw `max_samples * X.shape[0]` samplesdefault: 1.0
n_estimatorsThe number of base estimators in the ensembledefault: 10
n_jobsThe number of jobs to run in parallel for both :meth:`fit` and :meth:`predict`. ``None`` means 1 unless in a :obj:`joblib.parallel_backend` context. ``-1`` means using all processors. See :term:`Glossary ` for more detailsdefault: null
oob_scoreWhether to use out-of-bag samples to estimate the generalization error. Only available if bootstrap=Truedefault: false
random_stateControls the random resampling of the original dataset (sample wise and feature wise) If the base estimator accepts a `random_state` attribute, a different seed is generated for each instance in the ensemble Pass an int for reproducible output across multiple function calls See :term:`Glossary `default: null
verboseControls the verbosity when fitting and predicting.default: 0
warm_startWhen set to True, reuse the solution of the previous call to fit and add more estimators to the ensemble, otherwise, just fit a whole new ensemble. See :term:`the Glossary ` .. versionadded:: 0.17 *warm_start* constructor parameterdefault: false

0
Runs

List all runs
Parameter:
Rendering chart
Rendering table