This error occurs when you pass the argument 'normalize' to the Ridge class constructor (init method), which is not a valid argument for the Ridge class.
The Ridge class has several valid arguments, such as alpha, fit_intercept, solver, etc. but 'normalize' is not one of them.
To resolve this error, simply remove the 'normalize' argument from the Ridge class constructor call. Alternatively, you can use a different class that supports the 'normalize' argument, such as RidgeCV or LassoCV.
Example of incorrect usage:
from sklearn.linear_model import Ridge
model = Ridge(normalize=True)
Example of correct usage:
from sklearn.linear_model import Ridge
model = Ridge(alpha=0.5, fit_intercept=True)
Alternatively, using RidgeCV:
from sklearn.linear_model import RidgeCV
model = RidgeCV(normalize=True)
Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss
Asked: 2022-01-16 11:00:00 +0000
Seen: 24 times
Last updated: Apr 12 '21
What is the meaning of "version list argument cannot be empty"?
How can the argument of Jest Mock Service be made assignable?
What is the method for configuring a single default argument in pybind11?
How can the error "Missing 1 required positional argument: 'number'" be restated?
The ASP.NET Core MVC HTTP post method is receiving a null argument from an Angular call.
Why is the solution for Ansible SSH user/pass Invalid Argument leading to host unreachability?
How can option processing be prevented after a command-line argument that is not an option?