dask_ml.ensemble.BlockwiseVotingRegressor

dask_ml.ensemble.BlockwiseVotingRegressor

class dask_ml.ensemble.BlockwiseVotingRegressor(estimator)

Blockwise training and ensemble voting regressor.

This regressor trains on blocks / partitions of Dask Arrays or DataFrames. A cloned version of estimator will be fit independently on each block or partition of the Dask collection.

Prediction is done by the ensemble of learned models.

Warning

Ensure that your data are sufficiently shuffled prior to training! If the values of the various blocks / partitions of your dataset are not distributed similarly, the regressor will give poor results.

Parameters
estimatorEstimator
Attributes
estimators_list of regressors

The collection of fitted sub-estimators that are estimator fitted on each partition / block of the inputs.

Examples

>>> import dask_ml.datasets
>>> import dask_ml.ensemble
>>> import sklearn.linear_model
>>> X, y = dask_ml.datasets.make_regression(n_samples=100_000,
...                                         chunks=10_000)
>>> subestimator = sklearn.linear_model.LinearRegression()
>>> clf = dask_ml.ensemble.BlockwiseVotingRegressor(
...     subestimator,
... )
>>> clf.fit(X, y)

Methods

get_metadata_routing()

Get metadata routing of this object.

get_params([deep])

Get parameters for this estimator.

score(X, y[, sample_weight])

Return the mean accuracy on the given test data and labels.

set_params(**params)

Set the parameters of this estimator.

set_score_request(*[, sample_weight])

Request metadata passed to the score method.

fit

predict

__init__(estimator)