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
Originally posted in #295, where a user (and I) were confused that model coefficients don't agree with optimizer coefficients. This is because SINDy.fit() creates a SINDyOptimizer as a final step to wrap the existing optimizer and unbias the coefficients.
Currently, the SINDyOptimizer class (and file) only exist to do the unbiasing step and does not inherit BaseOptimizer. OTOH, BaseOptimizer mentions an unbias parameter in its docstring but does not actually implement it. Should SINDyOptimizer be removed, and BaseOptimizer incorporate unbias? Or should the docstring for BaseOptimizer remove unbias? I'm slightly in favor of the former: it feels like the correct way to add functionality to all subclasses is to add the functionality to the base class, rather than wrapping all the objects after instantiation. I've vacillated on this issue a few times, however.
The text was updated successfully, but these errors were encountered:
Yes, the unbiasing step is currently confusing. I think it would be more natural especially if the opt.history_ of the optimizer opt used in a fit included the last unbiasing step and if the final 'opt.coef_' was actually the unbiased coefficient, which I think doesn't happen currently because the new wrapper object is created around opt. I agree that it would be better to implement it in the BaseOptimizer and remove the SINDyOptimizer wrapper.
Jacob-Stevens-Haas
changed the title
Either remove SINDyOptimizer or unbias arg in BaseOptimizer
Either remove SINDyOptimizer or unbias arg in BaseOptimizerJul 4, 2023
Originally posted in #295, where a user (and I) were confused that model coefficients don't agree with optimizer coefficients. This is because
SINDy.fit()
creates aSINDyOptimizer
as a final step to wrap the existing optimizer andunbias
the coefficients.Currently, the
SINDyOptimizer
class (and file) only exist to do the unbiasing step and does not inheritBaseOptimizer
. OTOH,BaseOptimizer
mentions anunbias
parameter in its docstring but does not actually implement it. ShouldSINDyOptimizer
be removed, andBaseOptimizer
incorporateunbias
? Or should the docstring forBaseOptimizer
removeunbias
? I'm slightly in favor of the former: it feels like the correct way to add functionality to all subclasses is to add the functionality to the base class, rather than wrapping all the objects after instantiation. I've vacillated on this issue a few times, however.The text was updated successfully, but these errors were encountered: