Describe the bug
PR scikit-learn/scikit-learn#17743 released in sklearn v1.0 makes an API change that is not reflected in cuml.
See release notes for detail.
Steps/Code to reproduce bug
Follow this guide http://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports to craft a minimal bug report. This helps us reproduce the issue you're having and resolve the issue more quickly.
import numpy as np
from sklearn.linear_model import LinearRegression
X = np.array([[1, 1], [1, 2], [2, 2], [2, 3]])
y = np.dot(X, np.array([1, 2])) + 3
reg = LinearRegression(fit_intercept=True,
normalize=True,
n_jobs=-1).fit(X, y)
Results in a warning...
/home/mmccarty/miniconda3/envs/rapids-22.06/lib/python3.9/site-packages/sklearn/linear_model/_base.py:141: FutureWarning: 'normalize' was deprecated in version 1.0 and will be removed in 1.2.
If you wish to scale the data, use Pipeline with a StandardScaler in a preprocessing stage. To reproduce the previous behavior:
from sklearn.pipeline import make_pipeline
model = make_pipeline(StandardScaler(with_mean=False), LinearRegression())
If you wish to pass a sample_weight parameter, you need to pass it as a fit parameter to each step of the pipeline as follows:
kwargs = {s[0] + '__sample_weight': sample_weight for s in model.steps}
model.fit(X, y, **kwargs)
warnings.warn(
However, cuml.linear_model.LinearRegression doesn't issue a warning.
Expected behavior
cuml estimator match the behavior of sklearn.
Describe the bug
PR scikit-learn/scikit-learn#17743 released in sklearn v1.0 makes an API change that is not reflected in
cuml.See release notes for detail.
Steps/Code to reproduce bug
Follow this guide http://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports to craft a minimal bug report. This helps us reproduce the issue you're having and resolve the issue more quickly.
Results in a warning...
However,
cuml.linear_model.LinearRegressiondoesn't issue a warning.Expected behavior
cumlestimator match the behavior ofsklearn.