Skip to content

Add to MCMC#2

Open
Occitane-Barbaux wants to merge 11 commits into
yrobink:masterfrom
Occitane-Barbaux:Ajout-MCMC
Open

Add to MCMC#2
Occitane-Barbaux wants to merge 11 commits into
yrobink:masterfrom
Occitane-Barbaux:Ajout-MCMC

Conversation

@Occitane-Barbaux

Copy link
Copy Markdown

Various changes:

  • Modifications to use SDFC's modification (see similar pull request). Most modification can be used with kwargs (see Test_OB_Addons.ipynb example)
  • Added light version of Multimodel where covariance for each climate modele is not used (so we don't need to sample and fit all samples to calculate it). Effect on the calculated multimodel is minimal. Please see exchanges with A. Ribes. (Not used by default, you have to use light=True). Makes the process from object creation to end of multimodel creation way faster..
  • MCMC Sample with ESS stopping point. Add variant where we keep the ESS size from the sample instead of one. (Originaly: 1000 X samples =1000 MCMC chains= 1000 final samples. ESS version: 100 X samples et 10 as ESS stopping point create 1000 final sample). Added function build_params_along_time_ess as post treatment (samples are kept under a different index). ! Beware: I did not modify the others post_treatment functions such as statistics (because I never use them).
  • ! BEWARE: Original version did not work with scipy 1.11.1: The sqrtm function is used by MModel for calculating std. It now sends back very high values (around e^19 in my example). Add possible correction only in the .rvs using np.random.default_rng().multivariate_normal which takes the cov. An alternative is using previous versions (scipy 1.9.3 still works). (I lost 4 days trying the find the origin of the error !!)

Bonne semaine !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant