Skip to content
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

Release 0.6.3 #95

Merged
merged 42 commits into from
Aug 27, 2021
Merged

Release 0.6.3 #95

merged 42 commits into from
Aug 27, 2021

Conversation

statrita2004
Copy link
Collaborator

Combining #94 and #95:

  • Fixed the MCMC routine (used with BSL and others) when a starting point for the chain is passed. If a 1d array or list was given, in fact, parameter shape at the end of inference was not correct and the diagnostic functions did not work properly.
  • Added a DrawFromPrior inference scheme, with similar API as the other inference schemes and is used to sample from prior with no need to specify observation. That also has another method which can be used to generate simulation-parameter pairs to be used for learning the automatic summary statistics utilities. I've added an example showing how to do that, and discussed that in the docs page.
  • Added a method to the Journal which allows to resample the posterior samples (bootstrap and subsample). That generates a new journal which is returned by the method.
  • Added a new GenerateFromJournal class which allows to generate simulations from a given model using parameter values stored in a journal. Together with the previous method this allows to perform predictive check.
  • Some reformatting to the Statistics; specifically, I've added the capability to standardize the different statistics by dividing them by their standard deviation on a set of reference simulations. Those simulations need to be provided at initialization of the statistics, at which point the standard deviation is computed. Then, each time the .statistics method is called, the resulting statistics are normalized by the standard deviation. Can be useful to use in cases in which the summaries have wildly varying magnitude.
  • Added the Statistics learning with exponential family based on Score Matching.
  • Refactored some code in the Journal class and its uses in the InferenceMethods: the add_opt_values method was outdated and used for two different thing in two difference InferenceMethod's. I have now added methods to store simulations and covariance matrices in the Journal.
  • Added option to not store the simulated dataset in the Journal for SMCABC. That breaks the possibility of restarting inference from the journal but greatly reduces journal size.
  • Added link to Youtube video presenting ABCpy in README
  • Added an example showing how to save to disk and re-load the learned neural network statistics.
  • Some minor fixes in docs and tests.

statrita2004 and others added 30 commits April 9, 2021 16:05
Also add example on how to use previous generated data to perform statistics learning and how to store and re-load NN fit with statistics learning routines.
That breaks restarting from Journal, added an error to take care of that.
Also added relevant unit tests.
Fixes and updates towards release 0.6.3
@codecov-commenter
Copy link

Codecov Report

Merging #95 (3ee238d) into master (3ee0aee) will increase coverage by 1.18%.
The diff coverage is 89.25%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #95      +/-   ##
==========================================
+ Coverage   83.72%   84.90%   +1.18%     
==========================================
  Files          27       27              
  Lines        5424     6143     +719     
  Branches      993     1143     +150     
==========================================
+ Hits         4541     5216     +675     
- Misses        600      623      +23     
- Partials      283      304      +21     
Impacted Files Coverage Δ
abcpy/continuousmodels.py 82.37% <ø> (ø)
abcpy/distances.py 89.50% <ø> (ø)
abcpy/statisticslearning.py 80.55% <78.18%> (+2.16%) ⬆️
abcpy/NN_utilities/networks.py 85.71% <87.28%> (+6.05%) ⬆️
abcpy/NN_utilities/trainer.py 80.24% <91.66%> (+1.86%) ⬆️
abcpy/inferences.py 88.13% <93.13%> (+0.45%) ⬆️
abcpy/output.py 87.82% <96.26%> (+4.12%) ⬆️
abcpy/NN_utilities/utilities.py 95.50% <96.82%> (+3.19%) ⬆️
abcpy/NN_utilities/algorithms.py 62.74% <100.00%> (+9.80%) ⬆️
abcpy/NN_utilities/losses.py 100.00% <100.00%> (ø)
... and 8 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3ee0aee...3ee238d. Read the comment docs.

@statrita2004 statrita2004 merged commit 48c4715 into master Aug 27, 2021
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.

None yet

3 participants