dynamicslab / pysindy

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

Feature request: Manually set coefficients #473

Closed b-fg closed 4 months ago

b-fg commented 4 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 4 months ago

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