PyMC v3.9.0 Release Notes

Release Date: 2020-06-16 // about 2 years ago
  • ๐Ÿ†• New features

    • ๐Ÿ‘‰ Use fastprogress instead of tqdm #3693.
    • ๐Ÿ‘€ DEMetropolis can now tune both lambda and scaling parameters, but by default neither of them are tuned. See #3743 for more info.
    • ๐Ÿ‘€ DEMetropolisZ, an improved variant of DEMetropolis brings better parallelization and higher efficiency with fewer chains with a slower initial convergence. This implementation is experimental. See #3784 for more info.
    • ๐Ÿ“„ Notebooks that give insight into DEMetropolis, DEMetropolisZ and the DifferentialEquation interface are now located in the Tutorials/Deep Dive section.
    • Add fast_sample_posterior_predictive, a vectorized alternative to sample_posterior_predictive. This alternative is substantially faster for large models.
    • ๐Ÿ‘€ GP covariance functions can now be exponentiated by a scalar. See PR #3852
    • sample_posterior_predictive can now feed on xarray.Dataset - e.g. from InferenceData.posterior. (see #3846)
    • SamplerReport ( now has properties n_tune, n_draws, t_sampling for increased convenience (see #3827)
    • ๐Ÿ‘€ pm.sample(..., return_inferencedata=True) can now directly return the trace as arviz.InferenceData (see #3911)
    • pm.sample now has support for adapting dense mass matrix using QuadPotentialFullAdapt (see #3596, #3705, #3858, and #3893). Use init="adapt_full" or init="jitter+adapt_full" to use.
    • ๐Ÿ‘€ Moyal distribution added (see #3870).
    • ๐Ÿ‘€ pm.LKJCholeskyCov now automatically computes and returns the unpacked Cholesky decomposition, the correlations and the standard deviations of the covariance matrix (see #3881).
    • ๐Ÿ›  pm.Data container can now be used for index variables, i.e with integer data and not only floats (issue #3813, fixed by #3925).
    • ๐Ÿ›  pm.Data container can now be used as input for other random variables (issue #3842, fixed by #3925).
    • ๐Ÿ‘ Allow users to specify coordinates and dimension names instead of numerical shapes when specifying a model. This makes interoperability with ArviZ easier. (see #3551)
    • ๐Ÿ“š Plots and Stats API sections now link to ArviZ documentation #3927
    • Add SamplerReport with properties n_draws, t_sampling and n_tune to SMC. n_tune is always 0 #3931.
    • ๐Ÿšš SMC-ABC: add option to define summary statistics, allow to sample from more complex models, remove redundant distances #3940

    ๐Ÿšง Maintenance

    • ๐Ÿ‘€ Tuning results no longer leak into sequentially sampled Metropolis chains (see #3733 and #3796).
    • We'll deprecate the Text and SQLite backends and the save_trace/load_trace functions, since this is now done with ArviZ. (see #3902)
    • ArviZ v0.8.3 is now the minimum required version
    • ๐Ÿ‘€ In named models, pm.Data objects now get model-relative names (see #3843).
    • ๐Ÿ‘€ pm.sample now takes 1000 draws and 1000 tuning samples by default, instead of 500 previously (see #3855).
    • ๐Ÿ’… Moved argument division out of NegativeBinomial random method. Fixes #3864 in the style of #3509.
    • ๐Ÿ‘€ The Dirichlet distribution now raises a ValueError when it's initialized with <= 0 values (see #3853).
    • ๐Ÿ›  Dtype bugfix in MvNormal and MvStudentT (see 3836).
    • End of sampling report now uses arviz.InferenceData internally and avoids storing pointwise log likelihood (see #3883).
    • ๐ŸŽ The multiprocessing start method on MacOS is now set to "forkserver", to avoid crashes (see issue #3849, solved by #3919).
    • ๐Ÿ‘€ The AR1 logp now uses the precision of the whole AR1 process instead of just the innovation precision (see issue #3892, fixed by #3899).
    • ๐Ÿ›  Forced the Beta distribution's random method to generate samples that are in the open interval $(0, 1)$, i.e. no value can be equal to zero or equal to one (issue #3898 fixed by #3924).
    • ๐Ÿ›  Fixed an issue that happened on Windows, that was introduced by the clipped beta distribution rvs function (#3924). Windows does not support the float128 dtype, but we had assumed that it had to be available. The solution was to only support float128 on Linux and Darwin systems (see issue #3929 fixed by #3930).

    ๐Ÿ—„ Deprecations

    • Remove sample_ppc and sample_ppc_w that were deprecated in 3.6.
    • ๐Ÿ‘€ Deprecated sd has been replaced by sigma (already in version 3.7) in continuous, mixed and timeseries distributions and now raises DeprecationWarning when sd is used. (see #3837 and #3688).
    • We'll deprecate the Text and SQLite backends and the save_trace/load_trace functions, since this is now done with ArviZ. (see #3902)
    • โฌ‡๏ธ Dropped some deprecated kwargs and functions (see #3906)
    • โฌ‡๏ธ Dropped the outdated 'nuts' initialization method for pm.sample (see #3863).

    ๐Ÿš€ Release manager for 3.9.0: Michael Osthege (@michaelosthege)