Skip to content

v3.6

Compare
Choose a tag to compare
@twiecki twiecki released this 20 Dec 18:04

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.