dagging.DaggingClassifier

class dagging.DaggingClassifier(base_estimator=None, n_estimators=10, random_state=None)

A Dagging classifier. This meta classifier creates a number of disjoint, stratified folds out of the data and feeds each chunk of data to a copy of the supplied base classifier. Predictions are made via hard or soft voting. Useful for base classifiers 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.

n_estimators_: int

The actual used estimators

voting_string

The method used for voting among classifiers.

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 mean accuracy on the given test data and labels.

set_params(self, **params)

Set the parameters of this estimator.

Attributes

predict_proba

Compute probabilities of possible outcomes for samples in X.