-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
type SparseIdentificationResult has no field basis #24
Comments
Are you instantiating the manifest? |
How do I do that? Do you mean instantiating the Pkg? Sorry, I am new to Julia! Everything until line 222
runs smoothly and I get the output figures. |
Did you run this part to get the specific versions used for the script?
|
When I run that part, I get the error: For what it's worth, I am running the script in jupyter lab inside a docker container. |
Are you using Julia v1.4? I am not sure about Jupyter Lab and all of that, but it might cause an issue. |
Ok, I have got it working locally on my machine with Julia v1.4. I am trying to train the universal ODE for 120 days and extrapolate the solution up to 240 days, but getting the warning and errors below:
Any idea on what went wrong and how to proceed? |
You have to be a bit careful with very long time integrations. If the random neural network is not stable enough, it'll diverge in the first run and then you can't actually adjust the parameters. That's what's going on here: the random neural network defines a neural network that goes to essentially infinity in that time. The way to handle this is to not start at the full time span, i.e. https://diffeqflux.sciml.ai/dev/examples/local_minima/ |
That makes sense. Would you for example suggest something like (forgive the syntax please):
to replace universal_differential_equations/SEIR_exposure/seir_exposure.jl Lines 161 to 166 in dd83689
Thanks! |
Yeah exactly, you can write a loop on that. |
I have implemented that (below), but it does not extrapolate well, even with SInDy. Here is the implementation:
In line 160 (before the for loop above)
I get the this warning:
which I guess is related to the convergence and the local minimum that you pointed out before. Is the poor extrapolation related to this warning? And any idea on how to proceed? |
I'd need more details. How well did the neural network fit? What kind of basis did it find? |
These are the basis:
Here is the full code:
The loss goes down as expected, but the extrapolation does not look good! |
I wouldn't expect anything to be perfect. I'd say that looks pretty good! It's extrapolating from like day 21 to day 80, which is a pretty strong showing! |
Ok, good to know. For the SInDy, do you have any suggestions to use data up to more days (e.g. 60 or 90) and extrapolate beyond the peaks? Would a similar strategy to Universal ODE (train incrementally) work for SInDy as well? Sorry, I am new to SInDy too, but it looks promising. |
I haven't seen anything, at least if it doesn't have enough data to perfectly learn the generating equation |
When I try to run the code, I get the following error:
universal_differential_equations/SEIR_exposure/seir_exposure.jl
Line 223 in dd83689
type SparseIdentificationResult has no field basis
Thanks!
The text was updated successfully, but these errors were encountered: