A question concerning examples/12_weakform_SINDy_examples.ipynb
#417
-
On command line [3] where Lorenz with 20 percent noise is tried I am confused by the comment:
Now, first of all, we cannot see Lorenz equation directly because there was no model output statement on line [3] but I added it
and it seemed that the models that were discovered where of polynomial order 2, i.e. Lorenz was not "correctly" identified. I do agree with what follows, e.g. the error that is plotted on command line [4] seems to, indeed, indicate that accuracy improves with the number of sub domains. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 8 replies
-
Burger equation seems fine, but when I try compressible 2D fluid I get with SINDy (not weak):
The R2 score seems reasonable but the expressions are different. Why could this be? |
Beta Was this translation helpful? Give feedback.
-
Hi @georgemilosh , not sure what you mean by the first question, I see the output from the
Also, the Lorenz equations being discovered are second-order polynomials: https://en.wikipedia.org/wiki/Lorenz_system, and the coefficients discovered were those used to generate the data. For the second question, an R2 score of 0.867 is not very good. SINDy is attempting to minimize the error in the prediction, and it does an okay job of discovering a model with a predicted time derivative that has some correlation with the actual time derivatives for the training data, but the model is not correct (it is overfitting the noise). If we were to evaluate the R2 score test data that differed from the training data, it would be much worse (that would probably be more illustrative, but we didn't generate a test trajectory in the example for simplicity). The example is illustrating that noise causes the nonweak form of SINDy to produce a bad model, while the weak form of SINDy in the next cell does discover the correct model. |
Beta Was this translation helpful? Give feedback.
-
Ah, perfect, thanks for the heads up. FYI the new ensembling approach is in the |
Beta Was this translation helpful? Give feedback.
Ah, okay, I can reproduce your output now--the release of pysindy available in pypi does indeed have the library terms mislabelled. We need to make a new release. In the meanwhile, to get the correct ordering, clone the repository and install it from source