dynamicslab / pysindy

A package for the sparse identification of nonlinear dynamical systems from data
https://pysindy.readthedocs.io/en/latest/
Other
1.46k stars 324 forks source link

Feature request: Manually set coefficients #473

Closed b-fg closed 9 months ago

b-fg commented 9 months ago

Currently, SINDy.coefficients() returns the coefficients matrix after fitting the model. However, for validation/testing purposes, it would also be nice to be able to set the coefficients manually with a method like SINDy.set_coefficients(coeff_matrix), where coeff_matrix.shape == SINDy.coefficients().shape.

b-fg commented 9 months ago

Oh, I see (eg) model.coefficients()[0,0]=1.0 works already.