You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just installed the PySINDy library, and it throws an TypeError: LinearRegression.__init__() got an unexpected keyword argument 'normalize' out of the box.
The version that conda installed for scikit-learn without any specification is 1.4.2.
According to the Changelog from scikit-learn, the normalize keyword has been deprecated since version 1.0 and removed since 1.2. However there is a proposed fix in the above linked changelog.
I just installed the PySINDy library, and it throws an
TypeError: LinearRegression.__init__() got an unexpected keyword argument 'normalize'
out of the box.The version that conda installed for
scikit-learn
without any specification is1.4.2
.According to the Changelog from
scikit-learn
, thenormalize
keyword has been deprecated since version1.0
and removed since1.2
. However there is a proposed fix in the above linked changelog.Reproducing code example:
Error message:
TypeError Traceback (most recent call last)
Cell In[15], line 3
1 differentiation_method = ps.FiniteDifference(order=2)
2 feature_library = ps.PolynomialLibrary(degree=3)
----> 3 optimizer = ps.STLSQ(threshold=0.2)
File ~/anaconda3/envs/rebound/lib/python3.10/site-packages/pysindy/optimizers/stlsq.py:105, in STLSQ.init(self, threshold, alpha, max_iter, ridge_kw, normalize, fit_intercept, copy_X, initial_guess)
94 def init(
95 self,
96 threshold=0.1,
(...)
103 initial_guess=None,
104 ):
--> 105 super(STLSQ, self).init(
106 max_iter=max_iter,
107 normalize=normalize,
108 fit_intercept=fit_intercept,
109 copy_X=copy_X,
110 )
112 if threshold < 0:
113 raise ValueError("threshold cannot be negative")
File ~/anaconda3/envs/rebound/lib/python3.10/site-packages/pysindy/optimizers/base.py:81, in BaseOptimizer.init(self, max_iter, normalize, fit_intercept, initial_guess, copy_X)
73 def init(
74 self,
75 max_iter=20,
(...)
79 copy_X=True,
80 ):
---> 81 super(BaseOptimizer, self).init(
82 fit_intercept=fit_intercept, normalize=normalize, copy_X=copy_X
83 )
85 if max_iter <= 0:
86 raise ValueError("max_iter must be positive")
TypeError: LinearRegression.init() got an unexpected keyword argument 'normalize'
PySINDy/Python version information:
1.3.0 3.10.14 (main, May 6 2024, 19:42:50) [GCC 11.2.0]
The text was updated successfully, but these errors were encountered: