-
Notifications
You must be signed in to change notification settings - Fork 359
Description
I'm following the youtube tutorial and it seems like ConstrainedSR3 isn't working. I searched in the repo and indeed there's a ConstrainedSR3 function, but when I try to use I get
AttributeError Traceback (most recent call last)
Cell In[27], line 28
25 # 1 * (x0 coefficient) = 28
26 constraint_lhs[1, 1 + n_features] = 1
---> 28 optimizer = ps.ConstrainedSR3(
29 constraint_rhs=constraint_rhs,
30 constraint_lhs=constraint_lhs,
31 reg_weight_lam=0.5,
32 thresholder="l1",
33 )
34 model = ps.SINDy(
35 optimizer=optimizer, feature_library=library
36 )
37 model.fit(x_train_added_noise, t=dt, feature_names=feature_names)
AttributeError: module 'pysindy' has no attribute 'ConstrainedSR3'
I thought it was because it was inside the optimizers module. I tried to use ps.optimizers.ConstrainedSR3, but it didn't work as well.
AttributeError Traceback (most recent call last)
Cell In[30], line 28
25 # 1 * (x0 coefficient) = 28
26 constraint_lhs[1, 1 + n_features] = 1
---> 28 optimizer = ps.optimizers.ConstrainedSR3(
29 constraint_rhs=constraint_rhs,
30 constraint_lhs=constraint_lhs,
31 reg_weight_lam=0.5,
32 thresholder="l1",
33 )
34 model = ps.SINDy(
35 optimizer=optimizer, feature_library=library
36 )
37 model.fit(x_train_added_noise, t=dt, feature_names=feature_names)
AttributeError: module 'pysindy.optimizers' has no attribute 'ConstrainedSR3'
I need some help