dagging.DaggingRegressor¶
-
class
dagging.
DaggingRegressor
(base_estimator=None, n_estimators=10, random_state=None)¶ A Dagging regressor. This meta regressor creates a number of disjoint, stratified folds out of the data and feeds each chunk of data to a copy of the supplied base regressor. Predictions are made via hard or soft voting. Useful for base regressor that are quadratic or worse in time behavior, regarding number of instances in the training data.
- Parameters
- base_estimatorobject or None, optional (default=None)
The base estimator to fit on random subsets of the dataset. If None, then the base estimator is a decision tree.
- n_estimatorsint, optional (default=3)
The number of base estimators in the ensemble.
- random_stateint, RandomState instance or None, optional (default=None)
If int, random_state is the seed used by the random number generator; If RandomState instance, random_state is the random number generator; If None, the random number generator is the RandomState instance used by np.random.
- Attributes
- base_estimator_estimator
The base estimator from which the ensemble is grown.
- estimators_list of estimators
The collection of fitted base estimators.
- References
- ———-
- .. [1] Ting, K. M., Witten, I. H.: Stacking Bagged and Dagged Models.
In: Fourteenth international Conference on Machine Learning, San Francisco, CA, 367-375, 1997
-
__init__
(self, base_estimator=None, n_estimators=10, random_state=None)¶ Initialize self. See help(type(self)) for accurate signature.
Methods
__init__
(self[, base_estimator, …])Initialize self.
fit
(self, X, y)Fit the estimators.
get_params
(self[, deep])Get parameters for this estimator.
predict
(self, X)Predict class labels for X.
score
(self, X, y[, sample_weight])Return the coefficient of determination R^2 of the prediction.
set_params
(self, **params)Set the parameters of this estimator.