def test_regressor_partial_fit():
    y_bin = y.copy()
    y_bin[y != 1] = -1

    for data in (X, X_csr):
        reg = PassiveAggressiveRegressor(C=1.0,
                                         fit_intercept=True,
                                         random_state=0)
        for t in range(50):
            reg.partial_fit(data, y_bin)
        pred = reg.predict(data)
        assert_less(np.mean((y_bin - pred) ** 2), 1.7)
dataset/ETHPy150Open scikit-learn/scikit-learn/sklearn/linear_model/tests/test_passive_aggressive.py/test_regressor_partial_fit/swapped operands of `-`