scikit-learn 1.2.dev breaks down the actual code. debug_script.py provides a small snippet to reproduce.
investigation
scikit-learn seems to have added a validation step of the class parameters at the fit moment.
our Lasso estimator doesn't have the same signature as the scikit-learn (e.g. copy_X and random_state), though we inherit from it.
Therefore we get an error when comparing the constructor arguments with the parent class
scikit-learn
1.2.dev breaks down the actual code.debug_script.py
provides a small snippet to reproduce.investigation
scikit-learn
seems to have added a validation step of the class parameters at thefit
moment. our Lasso estimator doesn't have the same signature as the scikit-learn (e.g.copy_X
andrandom_state
), though we inherit from it.Therefore we get an error when comparing the constructor arguments with the parent class
click to expend error
```shell raise ValueError( ValueError: The parameter constraints ['alpha', 'fit_intercept', 'precompute', 'max_iter', 'copy_X', 'tol', 'warm_start', 'positive', 'random_state', 'selection'] contain unexpected parameters {'copy_X', 'precompute', 'random_state', 'selection'} ```potential fix
A straightforward fix would be to override
_validate_params
. But I don't think it's a reliable way to do it.click to expend code
```python def _validate_params(self): pass ```