PyMC v3.6 Release Notes

Release Date: 2018-12-21 // over 5 years ago
  • ๐Ÿ›  This is a major new release from 3.5 with many new features and important bugfixes. The highlight is certainly our completely revamped website: https://docs.pymc.io/

    ๐Ÿš€ Note also, that this release will be the last to be compatible with Python 2. Thanks to all contributors!

    ๐Ÿ†• New features

    • ๐ŸŒฒ Track the model log-likelihood as a sampler stat for NUTS and HMC samplers
      (accessible as trace.get_sampler_stats('model_logp')) (#3134)
    • โž• Add Incomplete Beta function incomplete_beta(a, b, value)
    • โž• Add log CDF functions to continuous distributions: Beta, Cauchy, ExGaussian, Exponential, Flat, Gumbel, HalfCauchy, HalfFlat, HalfNormal, Laplace, Logistic, Lognormal, Normal, Pareto, StudentT, Triangular, Uniform, Wald, Weibull.
    • Behavior of sample_posterior_predictive is now to produce posterior predictive samples, in order, from all values of the trace. Previously, by default it would produce 1 chain worth of samples, using a random selection from the trace (#3212)
    • ๐Ÿ‘‰ Show diagnostics for initial energy errors in HMC and NUTS.
    • PR #3273 has added the distributions.distribution._DrawValuesContext context
      manager. This is used to store the values already drawn in nested random
      and draw_values calls, enabling draw_values to draw samples from the
      joint probability distribution of RVs and not the marginals. Custom
      distributions that must call draw_values several times in their random
      method, or that invoke many calls to other distribution's random methods
      (e.g. mixtures) must do all of these calls under the same _DrawValuesContext
      context manager instance. If they do not, the conditional relations between
      the distribution's parameters could be broken, and random could return
      values drawn from an incorrect distribution.
    • Rice distribution is now defined with either the noncentrality parameter or the shape parameter (#3287).

    ๐Ÿšง Maintenance

    • ๐Ÿ“š Big rewrite of documentation (#3275)
    • ๐Ÿ›  Fixed Triangular distribution c attribute handling in random and updated sample codes for consistency (#3225)
    • ๐Ÿ”จ Refactor SMC and properly compute marginal likelihood (#3124)
    • โœ‚ Removed use of deprecated ymin keyword in matplotlib's Axes.set_ylim (#3279)
    • ๐Ÿ›  Fix for #3210. Now distribution.draw_values(params), will draw the params values from their joint probability distribution and not from combinations of their marginals (Refer to PR #3273).
    • โœ‚ Removed dependence on pandas-datareader for retrieving Yahoo Finance data in examples (#3262)
    • ๐Ÿ‘ Rewrote Multinomial._random method to better handle shape broadcasting (#3271)
    • ๐Ÿ›  Fixed Rice distribution, which inconsistently mixed two parametrizations (#3286).
    • Rice distribution now accepts multiple parameters and observations and is usable with NUTS (#3289).
    • sample_posterior_predictive no longer calls draw_values to initialize the shape of the ppc trace. This called could lead to ValueError's when sampling the ppc from a model with Flat or HalfFlat prior distributions (Fix issue #3294).

    ๐Ÿ—„ Deprecations

    • Renamed sample_ppc() and sample_ppc_w() to sample_posterior_predictive() and sample_posterior_predictive_w(), respectively.