Пример #1
0
    def test_basic(self, single_chunk_regression):
        X, y = single_chunk_regression
        a = lm.PartialSGDRegressor(random_state=0, max_iter=1000, tol=1e-3)
        b = lm_.SGDRegressor(random_state=0, max_iter=1000, tol=1e-3)

        a.fit(X, y)
        b.partial_fit(*dask.compute(X, y))
        assert_estimator_equal(a, b, exclude=exclude)
Пример #2
0
    def test_numpy_arrays(self, single_chunk_regression):
        X, y = single_chunk_regression
        a = lm.PartialSGDRegressor(random_state=0, max_iter=1000, tol=1e-3)

        a.fit(X, y)
        X = X.compute()
        y = y.compute()
        a.predict(X)
        a.score(X, y)