Skip to content

Releases: pymc-devs/pymc

PyMC3 3.11.1 (12 February 2021)

12 Feb 18:39
Compare
Choose a tag to compare

New Features

  • Automatic imputations now also work with ndarray data, not just pd.Series or pd.DataFrame (see#4439).
  • pymc3.sampling_jax.sample_numpyro_nuts now returns samples from transformed random variables, rather than from the unconstrained representation (see #4427).

Maintenance

  • We upgraded to Theano-PyMC v1.1.2 which includes bugfixes for...
    • ⚠ a problem with tt.switch that affected the behavior of several distributions, including at least the following special cases (see #4448)
      1. Bernoulli when all the observed values were the same (e.g., [0, 0, 0, 0, 0]).
      2. TruncatedNormal when sigma was constant and mu was being automatically broadcasted to match the shape of observations.
    • Warning floods and compiledir locking (see #4444)
  • math.log1mexp_numpy no longer raises RuntimeWarning when given very small inputs. These were commonly observed during NUTS sampling (see #4428).
  • ScalarSharedVariable can now be used as an input to other RVs directly (see #4445).
  • pm.sample and pm.find_MAP no longer change the start argument (see #4458).
  • Fixed Dirichlet.logp method to work with unit batch or event shapes (see #4454).
  • Bugfix in logp and logcdf methods of Triangular distribution (see #4470).

Release manager for 3.11.1: Michael Osthege (@michaelosthege)

PyMC3 3.11.0 (21 January 2021)

21 Jan 08:36
Compare
Choose a tag to compare

This release breaks some APIs w.r.t. 3.10.0. It also brings some dreadfully awaited fixes, so be sure to go through the (breaking) changes below.

Breaking Changes

  • ⚠ Many plotting and diagnostic functions that were just aliasing ArviZ functions were removed (see 4397). This includes pm.summary, pm.traceplot, pm.ess and many more!
  • Changed shape behavior: No longer collapse length 1 vector shape into scalars. (see #4206 and #4214)
  • ⚠ We now depend on Theano-PyMC version 1.1.0 exactly (see #4405). Major refactorings were done in Theano-PyMC 1.1.0. If you implement custom Ops or interact with Theano in any way yourself, make sure to read the Theano-PyMC 1.1.0 release notes.
  • ⚠ Python 3.6 support was dropped (by no longer testing) and Python 3.9 was added (see #4332).
  • ⚠ Changed shape behavior: No longer collapse length 1 vector shape into scalars. (see #4206 and #4214)
    • Applies to random variables and also the .random(size=...) kwarg!
    • To create scalar variables you must now use shape=None or shape=().
    • shape=(1,) and shape=1 now become vectors. Previously they were collapsed into scalars
    • 0-length dimensions are now ruled illegal for random variables and raise a ValueError.
  • In sample_prior_predictive the vars kwarg was removed in favor of var_names (see #4327).
  • Removed theanof.set_theano_config because it illegally changed Theano's internal state (see #4329).

New Features

  • Option to set check_bounds=False when instantiating pymc3.Model(). This turns off bounds checks that ensure that input parameters of distributions are valid. For correctly specified models, this is unneccessary as all parameters get automatically transformed so that all values are valid. Turning this off should lead to faster sampling (see #4377).
  • OrderedProbit distribution added (see #4232).
  • plot_posterior_predictive_glm now works with arviz.InferenceData as well (see #4234)
  • Add logcdf method to all univariate discrete distributions (see #4387).
  • Add random method to MvGaussianRandomWalk (see #4388)
  • AsymmetricLaplace distribution added (see #4392).
  • DirichletMultinomial distribution added (see #4373).
  • Added a new predict method to BART to compute out of sample predictions (see #4310).

Maintenance

  • Fixed bug whereby partial traces returns after keyboard interrupt during parallel sampling had fewer draws than would've been available #4318
  • Make sample_shape same across all contexts in draw_values (see #4305).
  • The notebook gallery has been moved to https://github.com/pymc-devs/pymc-examples (see #4348).
  • math.logsumexp now matches scipy.special.logsumexp when arrays contain infinite values (see #4360).
  • Fixed mathematical formulation in MvStudentT random method. (see #4359)
  • Fix issue in logp method of HyperGeometric. It now returns -inf for invalid parameters (see 4367)
  • Fixed MatrixNormal random method to work with parameters as random variables. (see #4368)
  • Update the logcdf method of several continuous distributions to return -inf for invalid parameters and values, and raise an informative error when multiple values cannot be evaluated in a single call. (see 4393 and #4421)
  • Improve numerical stability in logp and logcdf methods of ExGaussian (see #4407)
  • Issue UserWarning when doing prior or posterior predictive sampling with models containing Potential factors (see #4419)
  • Dirichlet distribution's random method is now optimized and gives outputs in correct shape (see #4416)
  • Attempting to sample a named model with SMC will now raise a NotImplementedError. (see #4365)

Release manager for 3.11.0: Eelke Spaak (@Spaak)

PyMC3 v3.10.0 (7 December 2020)

07 Dec 15:59
a9806db
Compare
Choose a tag to compare

This is a major release with many exciting new features. The biggest change is that we now rely on our own fork of Theano-PyMC. This is in line with our big announcement about our commitment to PyMC3 and Theano.

When upgrading, make sure that Theano-PyMC and not Theano are installed (the imports remain unchanged, however). If not, you can uninstall Theano:

conda remove theano

And to install:

conda install -c conda-forge theano-pymc

Or, if you are using pip (not recommended):

pip uninstall theano

And to install:

pip install theano-pymc

This new version of Theano-PyMC comes with an experimental JAX backend which, when combined with the new and experimental JAX samplers in PyMC3, can greatly speed up sampling in your model. As this is still very new, please do not use it in production yet but do test it out and let us know if anything breaks and what results you are seeing, especially speed-wise.

New features

  • New experimental JAX samplers in pymc3.sample_jax (see notebook and #4247). Requires JAX and either TFP or numpyro.
  • Add MLDA, a new stepper for multilevel sampling. MLDA can be used when a hierarchy of approximate posteriors of varying accuracy is available, offering improved sampling efficiency especially in high-dimensional problems and/or where gradients are not available (see #3926)
  • Add Bayesian Additive Regression Trees (BARTs) #4183)
  • Added pymc3.gp.cov.Circular kernel for Gaussian Processes on circular domains, e.g. the unit circle (see #4082).
  • Added a new MixtureSameFamily distribution to handle mixtures of arbitrary dimensions in vectorized form for improved speed (see #4185).
  • sample_posterior_predictive_w can now feed on xarray.Dataset - e.g. from InferenceData.posterior. (see #4042)
  • Change SMC metropolis kernel to independent metropolis kernel #4115)
  • Add alternative parametrization to NegativeBinomial distribution in terms of n and p (see #4126)
  • Added semantically meaningful str representations to PyMC3 objects for console, notebook, and GraphViz use (see #4076, #4065, #4159, #4217, #4243, and #4260).
  • Add Discrete HyperGeometric Distribution (see #4249)

Maintenance

  • Switch the dependency of Theano to our own fork, Theano-PyMC.
  • Removed non-NDArray (Text, SQLite, HDF5) backends and associated tests.
  • Use dill to serialize user defined logp functions in DensityDist. The previous serialization code fails if it is used in notebooks on Windows and Mac. dill is now a required dependency. (see #3844).
  • Fixed numerical instability in ExGaussian's logp by preventing logpow from returning -inf (see #4050).
  • Numerically improved stickbreaking transformation - e.g. for the Dirichlet distribution. #4129
  • Enabled the Multinomial distribution to handle batch sizes that have more than 2 dimensions. #4169
  • Test model logp before starting any MCMC chains (see #4211)
  • Fix bug in model.check_test_point that caused the test_point argument to be ignored. (see PR #4211)
  • Refactored MvNormal.random method with better handling of sample, batch and event shapes. #4207
  • The InverseGamma distribution now implements a logcdf. #3944
  • Make starting jitter methods for nuts sampling more robust by resampling values that lead to non-finite probabilities. A new optional argument jitter-max-retries can be passed to pm.sample() and pm.init_nuts() to control the maximum number of retries per chain. 4298

Documentation

  • Added a new notebook demonstrating how to incorporate sampling from a conjugate Dirichlet-multinomial posterior density in conjunction with other step methods (see #4199).
  • Mentioned the way to do any random walk with theano.tensor.cumsum() in GaussianRandomWalk docstrings (see #4048).

Release manager for 3.10.0: Eelke Spaak (@Spaak)

PyMC3 v3.9.3 (August 11, 2020)

11 Aug 03:30
63eba59
Compare
Choose a tag to compare

This release includes several fixes, including (but not limited to) the following:

  • Fix keep_size argument in Arviz data structures: #4006
  • Pin Theano 1.0.5: #4032
  • Comprehensively re-wrote radon modeling notebook using latest Arviz features: #3963

NB: The docs/* folder is still removed from the tarball due to an upload size limit on PyPi.

PyMC3 v3.9.2 (24 June 2020)

24 Jun 12:08
0790115
Compare
Choose a tag to compare

Maintenance

  • Warning added in GP module when input_dim is lower than the number of columns in X to compute the covariance function (see #3974).
  • Pass the tune argument from sample when using advi+adapt_diag_grad (see issue #3965, fixed by #3979).
  • Add simple test case for new coords and dims feature in pm.Model (see #3977).
  • Require ArviZ >= 0.9.0 (see #3977).

NB: The docs/* folder is still removed from the tarball due to an upload size limit on PyPi.

PyMC3 v3.9.1 (16 June, 2020)

16 Jun 18:47
ed66bc4
Compare
Choose a tag to compare

The v3.9.0 upload to PyPI didn't include a tarball, which is fixed in this release. Though we had to temporarily remove the docs/* folder from the tarball due to a PyPI size limit.

PyMC3 v3.9.0 (16 June, 2020)

16 Jun 16:38
Compare
Choose a tag to compare

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 (MultiTrace.report) 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).

PyMC3 v3.8 (29 November, 2019)

30 Nov 18:21
ca35f4f
Compare
Choose a tag to compare

New features

  • Implemented robust u turn check in NUTS (similar to stan-dev/stan#2800). See PR [#3605]
  • Add capabilities to do inference on parameters in a differential equation with DifferentialEquation. See #3590 and #3634.
  • Distinguish between Data and Deterministic variables when graphing models with graphviz. PR #3491.
  • Sequential Monte Carlo - Approximate Bayesian Computation step method is now available. The implementation is in an experimental stage and will be further improved.
  • Added Matern12 covariance function for Gaussian processes. This is the Matern kernel with nu=1/2.
  • Progressbar reports number of divergences in real time, when available #3547.
  • Sampling from variational approximation now allows for alternative trace backends [#3550].
  • Infix @ operator now works with random variables and deterministics #3619.
  • ArviZ is now a requirement, and handles plotting, diagnostics, and statistical checks.
  • Can use GaussianRandomWalk in sample_prior_predictive and sample_prior_predictive #3682
  • Now 11 years of S&P returns in data set#3682

Maintenance

  • Moved math operations out of Rice, TruncatedNormal, Triangular and ZeroInflatedNegativeBinomial random methods. Math operations on values returned by draw_values might not broadcast well, and all the size aware broadcasting is left to generate_samples. Fixes #3481 and #3508
  • Parallelization of population steppers (DEMetropolis) is now set via the cores argument. (#3559)
  • Fixed a bug in Categorical.logp. In the case of multidimensional p's, the indexing was done wrong leading to incorrectly shaped tensors that consumed O(n**2) memory instead of O(n). This fixes issue #3535
  • Fixed a defect in OrderedLogistic.__init__ that unnecessarily increased the dimensionality of the underlying p. Related to issue issue #3535 but was not the true cause of it.
  • SMC: stabilize covariance matrix 3573
  • SMC: is no longer a step method of pm.sample now it should be called using pm.sample_smc 3579
  • SMC: improve computation of the proposal scaling factor 3594 and 3625
  • SMC: reduce number of logp evaluations 3600
  • SMC: remove scaling and tune_scaling arguments as is a better idea to always allow SMC to automatically compute the scaling factor 3625
  • Now uses multiprocessong rather than psutil to count CPUs, which results in reliable core counts on Chromebooks.
  • sample_posterior_predictive now preallocates the memory required for its output to improve memory usage. Addresses problems raised in this discourse thread.
  • Fixed a bug in Categorical.logp. In the case of multidimensional p's, the indexing was done wrong leading to incorrectly shaped tensors that consumed O(n**2) memory instead of O(n). This fixes issue #3535
  • Fixed a defect in OrderedLogistic.__init__ that unnecessarily increased the dimensionality of the underlying p. Related to issue issue #3535 but was not the true cause of it.
  • Wrapped DensityDist.rand with generate_samples to make it aware of the distribution's shape. Added control flow attributes to still be able to behave as in earlier versions, and to control how to interpret the size parameter in the random callable signature. Fixes 3553
  • Added theano.gof.graph.Constant to type checks done in _draw_value (fixes issue 3595)
  • HalfNormal did not used to work properly in draw_values, sample_prior_predictive, or sample_posterior_predictive (fixes issue 3686)
  • Random variable transforms were inadvertently left out of the API documentation. Added them. (See PR 3690).

PyMC3 3.7 (May 29 2019)

29 May 14:47
Compare
Choose a tag to compare

New features

  • Add data container class (Data) that wraps the theano SharedVariable class and let the model be aware of its inputs and outputs.
  • Add function set_data to update variables defined as Data.
  • Mixture now supports mixtures of multidimensional probability distributions, not just lists of 1D distributions.
  • GLM.from_formula and LinearComponent.from_formula can extract variables from the calling scope. Customizable via the new eval_env argument. Fixing #3382.
  • Added the distributions.shape_utils module with functions used to help broadcast samples drawn from distributions using the size keyword argument.
  • Used numpy.vectorize in distributions.distribution._compile_theano_function. This enables sample_prior_predictive and sample_posterior_predictive to ask for tuples of samples instead of just integers. This fixes issue #3422.

Maintenance

  • All occurances of sd as a parameter name have been renamed to sigma. sd will continue to function for backwards compatibility.
  • HamiltonianMC was ignoring certain arguments like target_accept, and not using the custom step size jitter function with expectation 1.
  • Made BrokenPipeError for parallel sampling more verbose on Windows.
  • Added the broadcast_distribution_samples function that helps broadcasting arrays of drawn samples, taking into account the requested size and the inferred distribution shape. This sometimes is needed by distributions that call several rvs separately within their random method, such as the ZeroInflatedPoisson (fixes issue #3310).
  • The Wald, Kumaraswamy, LogNormal, Pareto, Cauchy, HalfCauchy, Weibull and ExGaussian distributions random method used a hidden _random function that was written with scalars in mind. This could potentially lead to artificial correlations between random draws. Added shape guards and broadcasting of the distribution samples to prevent this (Similar to issue #3310).
  • Added a fix to allow the imputation of single missing values of observed data, which previously would fail (fixes issue #3122).
  • The draw_values function was too permissive with what could be grabbed from inside point, which lead to an error when sampling posterior predictives of variables that depended on shared variables that had changed their shape after pm.sample() had been called (fix issue #3346).
  • draw_values now adds the theano graph descendants of TensorConstant or SharedVariables to the named relationship nodes stack, only if these descendants are ObservedRV or MultiObservedRV instances (fixes issue #3354).
  • Fixed bug in broadcast_distrution_samples, which did not handle correctly cases in which some samples did not have the size tuple prepended.
  • Changed MvNormal.random's usage of tensordot for Cholesky encoded covariances. This lead to wrong axis broadcasting and seemed to be the cause for issue #3343.
  • Fixed defect in Mixture.random when multidimensional mixtures were involved. The mixture component was not preserved across all the elements of the dimensions of the mixture. This meant that the correlations across elements within a given draw of the mixture were partly broken.
  • Restructured Mixture.random to allow better use of vectorized calls to comp_dists.random.
  • Added tests for mixtures of multidimensional distributions to the test suite.
  • Fixed incorrect usage of broadcast_distribution_samples in DiscreteWeibull.
  • Mixture's default dtype is now determined by theano.config.floatX.
  • dist_math.random_choice now handles nd-arrays of category probabilities, and also handles sizes that are not None. Also removed unused k kwarg from dist_math.random_choice.
  • Changed Categorical.mode to preserve all the dimensions of p except the last one, which encodes each category's probability.
  • Changed initialization of Categorical.p. p is now normalized to sum to 1 inside logp and random, but not during initialization. This could hide negative values supplied to p as mentioned in #2082.
  • Categorical now accepts elements of p equal to 0. logp will return -inf if there are values that index to the zero probability categories.
  • Add sigma, tau, and sd to signature of NormalMixture.
  • Set default lower and upper values of -inf and inf for pm.distributions.continuous.TruncatedNormal. This avoids errors caused by their previous values of None (fixes issue #3248).
  • Converted all calls to pm.distributions.bound._ContinuousBounded and pm.distributions.bound._DiscreteBounded to use only and all positional arguments (fixes issue #3399).
  • Restructured distributions.distribution.generate_samples to use the shape_utils module. This solves issues #3421 and #3147 by using the size aware broadcating functions in shape_utils.
  • Fixed the Multinomial.random and Multinomial.random_ methods to make them compatible with the new generate_samples function. In the process, a bug of the Multinomial.random_ shape handling was discovered and fixed.
  • Fixed a defect found in Bound.random where the point dictionary was passed to generate_samples as an arg instead of in not_broadcast_kwargs.
  • Fixed a defect found in Bound.random_ where total_size could end up as a float64 instead of being an integer if given size=tuple().
  • Fixed an issue in model_graph that caused construction of the graph of the model for rendering to hang: replaced a search over the powerset of the nodes with a breadth-first search over the nodes. Fix for #3458.
  • Removed variable annotations from model_graph but left type hints (Fix for #3465). This means that we support python>=3.5.4.
  • Default target_acceptfor HamiltonianMC is now 0.65, as suggested in Beskos et. al. 2010 and Neal 2001.
  • Fixed bug in draw_values that lead to intermittent errors in python3.5. This happened with some deterministic nodes that were drawn but not added to givens.

Deprecations

  • nuts_kwargs and step_kwargs have been deprecated in favor of using the standard kwargs to pass optional step method arguments.
  • SGFS and CSG have been removed (Fix for #3353). They have been moved to pymc3-experimental.
  • References to live_plot and corresponding notebooks have been removed.
  • Function approx_hessian was removed, due to numdifftools becoming incompatible with current scipy. The function was already optional, only available to a user who installed numdifftools separately, and not hit on any common codepaths. #3485.
  • Deprecated vars parameter of sample_posterior_predictive in favor of varnames.
  • References to live_plot and corresponding notebooks have been removed.
  • Deprecated vars parameters of sample_posterior_predictive and sample_prior_predictive in favor of var_names. At least for the latter, this is more accurate, since the vars parameter actually took names.

Contributors sorted by number of commits

45  Luciano Paz
38  Thomas Wiecki
23  Colin Carroll
19  Junpeng Lao
15  Chris Fonnesbeck
13  Juan Martín Loyola
13  Ravin Kumar
 8  Robert P. Goldman
 5  Tim Blazina
 4  chang111
 4  adamboche
 3  Eric Ma
 3  Osvaldo Martin
 3  Sanmitra Ghosh
 3  Saurav Shekhar
 3  chartl
 3  fredcallaway
 3  Demetri
 2  Daisuke Kondo
 2  David Brochart
 2  George Ho
 2  Vaibhav Sinha
 1  rpgoldman
 1  Adel Tomilova
 1  Adriaan van der Graaf
 1  Bas Nijholt
 1  Benjamin Wild
 1  Brigitta Sipocz
 1  Daniel Emaasit
 1  Hari
 1  Jeroen
 1  Joseph Willard
 1  Juan Martin Loyola
 1  Katrin Leinweber
 1  Lisa Martin
 1  M. Domenzain
 1  Matt Pitkin
 1  Peadar Coyle
 1  Rupal Sharma
 1  Tom Gilliss
 1  changjiangeng
 1  michaelosthege
 1  monsta
 1  579397

v3.6

20 Dec 18:04
Compare
Choose a tag to compare

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.