-
Notifications
You must be signed in to change notification settings - Fork 304
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
model.score does not work with WeakPDELibrary #155
Comments
This is actually by design, although we could easily add some code to fix this. The problem here with the weak form is that the code is now computing integral ( x_dot * w) = integral (w_dot * x) , rather than x_dot itself, and then doing the regression. The problem with score is that what it usually does is compute |x_dot_true - x_dot_pred|, but x_dot_true is some strange integral quantity with different dimensions than normal. I'll look into fixing this, although I show a "hack" to get around this in the Example 12 notebook. Best, |
I'm working on some performance improvements to the WeakPDELibrary now in the weak_optimization branch--it should be easy to make the score function transform the data to the integrals in the weak case. I will add it with my next commit! |
@znicolaou
It might be a good idea to report both metrics with the weak form models. |
You're right, there are some ambiguities about what the score means in the weak case.
I'll run some benchmarks to see what the differences are eventually. |
Dear Alan and Zachary, thank you on your remarks and answering my questions so fast. Indeed, I forgot that you presented a work around in example 12. And thanks for sharing your ideas and issues with the weak form score estimation, Best wishes, |
Addressed in the new release, closing this now. |
* Added AR-LSTM * Update docs/source/usage/config.rst Co-authored-by: Martin Gauch <15731649+gauchm@users.noreply.github.com> * Update neuralhydrology/modelzoo/arlstm.py Co-authored-by: Martin Gauch <15731649+gauchm@users.noreply.github.com> * Update neuralhydrology/utils/config.py Co-authored-by: Martin Gauch <15731649+gauchm@users.noreply.github.com> * PR changes 1 * CUDA-LSTM in AR-LSTM * removed redundancy in head of arlstm * more thorough AR error checking. * syntax error in check of lagged inputs * removed check against negative lagged integers. * added ARLSTM documentation * Update docs/source/usage/models.rst Co-authored-by: Martin Gauch <15731649+gauchm@users.noreply.github.com> * Update docs/source/usage/models.rst Co-authored-by: Martin Gauch <15731649+gauchm@users.noreply.github.com> * Update docs/source/usage/models.rst Co-authored-by: Martin Gauch <15731649+gauchm@users.noreply.github.com> * added doc for arlstm * arlstm docs * Update docs/source/api/neuralhydrology.modelzoo.arlstm.rst Co-authored-by: Frederik Kratzert <kratzert@users.noreply.github.com> * Update models.rst Co-authored-by: Martin Gauch <15731649+gauchm@users.noreply.github.com> Co-authored-by: Frederik Kratzert <kratzert@users.noreply.github.com>
Hi, I noticed that when I want to analyse spatiotemporal data set with a weak pde formulation, the application of the score function does not work well, as it states a problem of dimensions of the predicted data. Here is an excerpt of the error message. In my analysis i attempted to use a data of spatial dims 300x300 and 50 time points with two variables --> u=array of 300,300,50,2.
If I modify the data to estimate the score for the time series of one point, the error message is as follows:
Interestingly, this works perfectly fine, if I apply the normal PDE library on the same data set. Can you give me a hint where the problem could lay?
The text was updated successfully, but these errors were encountered: