Closed
Description
Describe the issue linked to the documentation
In different sklearn.linear_model classes such as ridge and ridgeCV, the normalize
parameter means actually standardize. This misnomer can cause lots of unnecessary confusion.
What normalize
means in general is to make the length of vector norm 1. This is clearly not ridge regression or lasso or other regularized linear model does.
Suggest a potential alternative/fix
rename the parameter as standardize
instead.
Please see the discussion here:
https://stackoverflow.com/questions/60216879/what-does-sklearn-linear-model-ridgecv-normalize-parameter-exactly-do/60233425#60233425
from sklearn.datasets import load_boston
dataset =load_boston()
X =dataset.data
y=dataset.target
clf = RidgeCV(normalize=True,alphas=[1e-3, 1e-2, 1e-1, 1]).fit(X, y)
clf.coef_
print(clf.alpha_)
print(clf.score(X,y))
print(clf.coef_)
coef =pd.DataFrame(zip(dataset.feature_names,clf.coef_)) #match SAS