PyMC v3.4.1 Release Notes

Release Date: 2018-04-19 // about 6 years ago
  • ๐Ÿš€ There was no 3.4 release due to a naming issue on PyPI.

    ๐Ÿ†• New features

    • Add logit_p keyword to pm.Bernoulli, so that users can specify the logit of the success probability. This is faster and more stable than using p=tt.nnet.sigmoid(logit_p).
    • โž• Add random keyword to pm.DensityDist thus enabling users to pass custom random method which in turn makes sampling from a DensityDist possible.
    • Effective sample size computation is updated. The estimation uses Geyer's initial positive sequence, which no longer truncates the autocorrelation series inaccurately. pm.diagnostics.effective_n now can reports N_eff>N.
    • โž• Added KroneckerNormal distribution and a corresponding MarginalKron
      Gaussian Process implementation for efficient inference, along with
      lower-level functions such as cartesian and kronecker products.
    • โž• Added Coregion covariance function.
    • โž• Add new 'pairplot' function, for plotting scatter or hexbin matrices of sampled parameters.
      Optionally it can plot divergences.
    • ๐Ÿ“„ Plots of discrete distributions in the docstrings
    • โž• Add logitnormal distribution
    • ๐Ÿ‘ Densityplot: add support for discrete variables
    • ๐Ÿ›  Fix the Binomial likelihood in .glm.families.Binomial, with the flexibility of specifying the n.
    • โž• Add offset kwarg to .glm.
    • ๐Ÿ”„ Changed the compare function to accept a dictionary of model-trace pairs instead of two separate lists of models and traces.
    • โž• add test and support for creating multivariate mixture and mixture of mixtures
    • distribution.draw_values, now is also able to draw values from conditionally dependent RVs, such as autotransformed RVs (Refer to PR #2902).

    ๐Ÿ›  Fixes

    • ๐Ÿšš VonMises does not overflow for large values of kappa. i0 and i1 have been removed and we now use log_i0 to compute the logp.
    • ๐Ÿ‘ The bandwidth for KDE plots is computed using a modified version of Scott's rule. The new version uses entropy instead of standard deviation. This works better for multimodal distributions. Functions using KDE plots has a new argument bw controlling the bandwidth.
    • ๐Ÿ›  fix PyMC3 variable is not replaced if provided in more_replacements (#2890)
    • ๐Ÿ›  Fix for issue #2900. For many situations, named node-inputs do not have a random method, while some intermediate node may have it. This meant that if the named node-input at the leaf of the graph did not have a fixed value, theano would try to compile it and fail to find inputs, raising a theano.gof.fg.MissingInputError. This was fixed by going through the theano variable's owner inputs graph, trying to get intermediate named-nodes values if the leafs had failed.
    • In distribution.draw_values, some named nodes could be theano.tensor.TensorConstants or theano.tensor.sharedvar.SharedVariables. Nevertheless, in distribution._draw_value, these would be passed to distribution._compile_theano_function as if they were theano.tensor.TensorVariables. This could lead to the following exceptions TypeError: ('Constants not allowed in param list', ...) or TypeError: Cannot use a shared variable (...). The fix was to not add theano.tensor.TensorConstant or theano.tensor.sharedvar.SharedVariable named nodes into the givens dict that could be used in distribution._compile_theano_function.
    • ๐Ÿ‘ Exponential support changed to include zero values.

    ๐Ÿ—„ Deprecations

    • ๐Ÿšš DIC and BPIC calculations have been removed
    • ๐Ÿšš df_summary have been removed, use summary instead
    • ๐Ÿ—„ njobs and nchains kwarg are deprecated in favor of cores and chains for sample
    • ๐Ÿ—„ lag kwarg in pm.stats.autocorr and pm.stats.autocov is deprecated.