In [1]:
# https://dask-ml.readthedocs.io/en/latest/incremental.html

from dask_ml.datasets import make_classification

In [2]:
from dask_ml.wrappers import Incremental

In [3]:
from sklearn.linear_model import SGDClassifier

In [4]:
X, y = make_classification(chunks=25)

In [5]:
X


Out[5]:
dask.array<normal, shape=(100, 20), dtype=float64, chunksize=(25, 20)>

In [6]:
estimator = SGDClassifier(random_state=10)

In [7]:
clf = Incremental(estimator, scoring='accuracy')

In [8]:
clf.fit(X, y, classes=[0, 1])


C:\ProgramData\Anaconda3\lib\site-packages\sklearn\linear_model\stochastic_gradient.py:128: FutureWarning: max_iter and tol parameters have been added in <class 'sklearn.linear_model.stochastic_gradient.SGDClassifier'> in 0.19. If both are left unset, they default to max_iter=5 and tol=None. If tol is not None, max_iter defaults to max_iter=1000. From 0.21, default max_iter will be 1000, and default tol will be 1e-3.
  "and default tol will be 1e-3." % type(self), FutureWarning)
Out[8]:
Incremental(estimator=SGDClassifier(alpha=0.0001, average=False, class_weight=None, epsilon=0.1,
       eta0=0.0, fit_intercept=True, l1_ratio=0.15,
       learning_rate='optimal', loss='hinge', max_iter=None, n_iter=None,
       n_jobs=1, penalty='l2', power_t=0.5, random_state=10, shuffle=True,
       tol=None, verbose=0, warm_start=False),
      scoring='accuracy')

In [ ]: