-
Notifications
You must be signed in to change notification settings - Fork 18
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
do not allow_singular=True
in multivariate_normal.logpdf
?
#187
Comments
allow_singular=True
in multivariate_normal.logpdf
allow_singular=True
in multivariate_normal.logpdf
?
@jschwaab calculated the (positive) log-likelihood for CMIP6 models (i.e. his number are more "realsitic" than my example). We see some models (e.g. ACCESS) which show an irregularity: |
Thinking a bit more about this - (2) will not work. Each crossvalidation fold has a certain "order of magnitude" and we need them all for a fair comparison between the localization radii. |
Sorry for not responding earlier @mathause . I think you are making a good point on option 2. Actually, the plots above have already been produced with that option (2). I guess to be somehow compatible it would be possible calculate the average in every iteration only for those folds that are available, but that would of course also mean losing a lot of folds and information therein making the log-likelihood curves less stable. |
In the function to find the optimal localization radius we calculate the logpdf of a multivariate normal distribution and allow singular matrices:
mesmer/mesmer/calibrate_mesmer/train_lv.py
Lines 386 to 388 in f5f7be1
(note that this code is currently being moved around in #184). However, this is problematic because it can distort the (negative) log-likelihood.
In the example the last one leads to a singular matrix - which leads to the smallest negative log likelihood, which would then be selected.
This problem is mitigated because, mesmer aborts the search early, i.e. as soon as the negative-log-likelihood starts to increase (hard to see but this would be the fourth element in out [
np.argmin(out[:-1])
returns 3]).Still I am a bit worried that we may end up selecting the wrong localization radius because of this & reluctant to leave something in that is obviously wrong.
Options
cc @jschwaab @leabeusch
The text was updated successfully, but these errors were encountered: