pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/math/py-pymc3 py-pymc3: updated to 3.7
details: https://anonhg.NetBSD.org/pkgsrc/rev/9b5e2e7407ce
branches: trunk
changeset: 335265:9b5e2e7407ce
user: adam <adam%pkgsrc.org@localhost>
date: Sun Jun 16 19:17:23 2019 +0000
description:
py-pymc3: updated to 3.7
PyMC3 3.7 (May 29 2019)
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.
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.
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.
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.
Added a fix to allow the imputation of single missing values of observed data, which previously would fail.
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.
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.
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.
Converted all calls to pm.distributions.bound._ContinuousBounded and pm.distributions.bound._DiscreteBounded to use only and all positional arguments.
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.
Removed variable annotations from model_graph but left type hints. 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. 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.
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.
diffstat:
math/py-pymc3/Makefile | 19 +++++---------
math/py-pymc3/PLIST | 63 +++++++++++--------------------------------------
math/py-pymc3/distinfo | 10 +++---
3 files changed, 27 insertions(+), 65 deletions(-)
diffs (201 lines):
diff -r 54e6b223d5e5 -r 9b5e2e7407ce math/py-pymc3/Makefile
--- a/math/py-pymc3/Makefile Sun Jun 16 19:14:52 2019 +0000
+++ b/math/py-pymc3/Makefile Sun Jun 16 19:17:23 2019 +0000
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.2 2018/07/23 01:37:54 minskim Exp $
+# $NetBSD: Makefile,v 1.3 2019/06/16 19:17:23 adam Exp $
-DISTNAME= pymc3-3.5
+DISTNAME= pymc3-3.7
PKGNAME= ${PYPKGPREFIX}-${DISTNAME}
-CATEGORIES= math
+CATEGORIES= math python
MASTER_SITES= ${MASTER_SITE_PYPI:=p/pymc3/}
MAINTAINER= minskim%NetBSD.org@localhost
@@ -10,21 +10,16 @@
COMMENT= Bayesian modeling and probabilistic machine learning
LICENSE= apache-2.0
+DEPENDS+= ${PYPKGPREFIX}-Theano>=1.0.0:../../math/py-Theano
DEPENDS+= ${PYPKGPREFIX}-h5py>=2.7.0:../../devel/py-h5py
-DEPENDS+= ${PYPKGPREFIX}-joblib>=0.9:../../devel/py-joblib
DEPENDS+= ${PYPKGPREFIX}-matplotlib>=1.5.0:../../graphics/py-matplotlib
+DEPENDS+= ${PYPKGPREFIX}-numpy>=1.13.0:../../math/py-numpy
DEPENDS+= ${PYPKGPREFIX}-pandas>=0.18.0:../../math/py-pandas
DEPENDS+= ${PYPKGPREFIX}-patsy>=0.4.0:../../math/py-patsy
-DEPENDS+= ${PYPKGPREFIX}-six>=1.10.0:../../lang/py-six
-DEPENDS+= ${PYPKGPREFIX}-Theano>=1.0.0:../../math/py-Theano
+DEPENDS+= ${PYPKGPREFIX}-scipy>=0.18.1:../../math/py-scipy
DEPENDS+= ${PYPKGPREFIX}-tqdm>=4.8.4:../../misc/py-tqdm
-.include "../../lang/python/pyversion.mk"
-.if "${PYPKGPREFIX}" == "py27"
-DEPENDS+= ${PYPKGPREFIX}-enum34>=1.1.6:../../devel/py-enum34
-.endif
+PYTHON_VERSIONS_INCOMPATIBLE= 27 # py-matplotlib, py-scipy
.include "../../lang/python/egg.mk"
-BUILDLINK_API_DEPENDS.py-numpy+= ${PYPKGPREFIX}-numpy>=1.13.0
-.include "../../math/py-numpy/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff -r 54e6b223d5e5 -r 9b5e2e7407ce math/py-pymc3/PLIST
--- a/math/py-pymc3/PLIST Sun Jun 16 19:14:52 2019 +0000
+++ b/math/py-pymc3/PLIST Sun Jun 16 19:17:23 2019 +0000
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.2 2018/07/23 01:37:54 minskim Exp $
+@comment $NetBSD: PLIST,v 1.3 2019/06/16 19:17:23 adam Exp $
${PYSITELIB}/${EGG_INFODIR}/PKG-INFO
${PYSITELIB}/${EGG_INFODIR}/SOURCES.txt
${PYSITELIB}/${EGG_INFODIR}/dependency_links.txt
@@ -22,9 +22,6 @@
${PYSITELIB}/pymc3/backends/report.py
${PYSITELIB}/pymc3/backends/report.pyc
${PYSITELIB}/pymc3/backends/report.pyo
-${PYSITELIB}/pymc3/backends/smc_text.py
-${PYSITELIB}/pymc3/backends/smc_text.pyc
-${PYSITELIB}/pymc3/backends/smc_text.pyo
${PYSITELIB}/pymc3/backends/sqlite.py
${PYSITELIB}/pymc3/backends/sqlite.pyc
${PYSITELIB}/pymc3/backends/sqlite.pyo
@@ -67,6 +64,9 @@
${PYSITELIB}/pymc3/distributions/multivariate.py
${PYSITELIB}/pymc3/distributions/multivariate.pyc
${PYSITELIB}/pymc3/distributions/multivariate.pyo
+${PYSITELIB}/pymc3/distributions/shape_utils.py
+${PYSITELIB}/pymc3/distributions/shape_utils.pyc
+${PYSITELIB}/pymc3/distributions/shape_utils.pyo
${PYSITELIB}/pymc3/distributions/special.py
${PYSITELIB}/pymc3/distributions/special.pyc
${PYSITELIB}/pymc3/distributions/special.pyo
@@ -100,20 +100,17 @@
${PYSITELIB}/pymc3/examples/data/Guber1999data.txt
${PYSITELIB}/pymc3/examples/data/HtWt.csv
${PYSITELIB}/pymc3/examples/data/SP500.csv
+${PYSITELIB}/pymc3/examples/data/babies.csv
${PYSITELIB}/pymc3/examples/data/cty.dat
${PYSITELIB}/pymc3/examples/data/efron-morris-75-data.tsv
${PYSITELIB}/pymc3/examples/data/extrahard_MC_500_5_4.npz.npy
${PYSITELIB}/pymc3/examples/data/extrahard_MC_500_5_4_reference_classes.npy
${PYSITELIB}/pymc3/examples/data/mastectomy.csv
+${PYSITELIB}/pymc3/examples/data/merged_ice_core_yearly.csv
${PYSITELIB}/pymc3/examples/data/milk.csv
${PYSITELIB}/pymc3/examples/data/monthly_in_situ_co2_mlo.csv
${PYSITELIB}/pymc3/examples/data/old_faithful.csv
${PYSITELIB}/pymc3/examples/data/pancreatitis.csv
-${PYSITELIB}/pymc3/examples/data/pmf/6bb8d06c69c0666e6da14c094d4320d115f1ffc8/shapes.json
-${PYSITELIB}/pymc3/examples/data/pmf/6bb8d06c69c0666e6da14c094d4320d115f1ffc8/test.txt
-${PYSITELIB}/pymc3/examples/data/pmf/6bb8d06c69c0666e6da14c094d4320d115f1ffc8/train.txt
-${PYSITELIB}/pymc3/examples/data/pmf/jester-dataset-v1-dense-first-1000.csv
-${PYSITELIB}/pymc3/examples/data/pmf/jokes.json
${PYSITELIB}/pymc3/examples/data/radon.csv
${PYSITELIB}/pymc3/examples/data/rugby.csv
${PYSITELIB}/pymc3/examples/data/srrs2.dat
@@ -157,9 +154,6 @@
${PYSITELIB}/pymc3/exceptions.py
${PYSITELIB}/pymc3/exceptions.pyc
${PYSITELIB}/pymc3/exceptions.pyo
-${PYSITELIB}/pymc3/external/__init__.py
-${PYSITELIB}/pymc3/external/__init__.pyc
-${PYSITELIB}/pymc3/external/__init__.pyo
${PYSITELIB}/pymc3/glm/__init__.py
${PYSITELIB}/pymc3/glm/__init__.pyc
${PYSITELIB}/pymc3/glm/__init__.pyo
@@ -205,39 +199,9 @@
${PYSITELIB}/pymc3/plots/__init__.py
${PYSITELIB}/pymc3/plots/__init__.pyc
${PYSITELIB}/pymc3/plots/__init__.pyo
-${PYSITELIB}/pymc3/plots/artists.py
-${PYSITELIB}/pymc3/plots/artists.pyc
-${PYSITELIB}/pymc3/plots/artists.pyo
-${PYSITELIB}/pymc3/plots/autocorrplot.py
-${PYSITELIB}/pymc3/plots/autocorrplot.pyc
-${PYSITELIB}/pymc3/plots/autocorrplot.pyo
-${PYSITELIB}/pymc3/plots/compareplot.py
-${PYSITELIB}/pymc3/plots/compareplot.pyc
-${PYSITELIB}/pymc3/plots/compareplot.pyo
-${PYSITELIB}/pymc3/plots/densityplot.py
-${PYSITELIB}/pymc3/plots/densityplot.pyc
-${PYSITELIB}/pymc3/plots/densityplot.pyo
-${PYSITELIB}/pymc3/plots/energyplot.py
-${PYSITELIB}/pymc3/plots/energyplot.pyc
-${PYSITELIB}/pymc3/plots/energyplot.pyo
-${PYSITELIB}/pymc3/plots/forestplot.py
-${PYSITELIB}/pymc3/plots/forestplot.pyc
-${PYSITELIB}/pymc3/plots/forestplot.pyo
-${PYSITELIB}/pymc3/plots/kdeplot.py
-${PYSITELIB}/pymc3/plots/kdeplot.pyc
-${PYSITELIB}/pymc3/plots/kdeplot.pyo
-${PYSITELIB}/pymc3/plots/pairplot.py
-${PYSITELIB}/pymc3/plots/pairplot.pyc
-${PYSITELIB}/pymc3/plots/pairplot.pyo
${PYSITELIB}/pymc3/plots/posteriorplot.py
${PYSITELIB}/pymc3/plots/posteriorplot.pyc
${PYSITELIB}/pymc3/plots/posteriorplot.pyo
-${PYSITELIB}/pymc3/plots/traceplot.py
-${PYSITELIB}/pymc3/plots/traceplot.pyc
-${PYSITELIB}/pymc3/plots/traceplot.pyo
-${PYSITELIB}/pymc3/plots/utils.py
-${PYSITELIB}/pymc3/plots/utils.pyc
-${PYSITELIB}/pymc3/plots/utils.pyo
${PYSITELIB}/pymc3/sampling.py
${PYSITELIB}/pymc3/sampling.pyc
${PYSITELIB}/pymc3/sampling.pyo
@@ -292,6 +256,9 @@
${PYSITELIB}/pymc3/step_methods/smc.py
${PYSITELIB}/pymc3/step_methods/smc.pyc
${PYSITELIB}/pymc3/step_methods/smc.pyo
+${PYSITELIB}/pymc3/step_methods/smc_utils.py
+${PYSITELIB}/pymc3/step_methods/smc_utils.pyc
+${PYSITELIB}/pymc3/step_methods/smc_utils.pyo
${PYSITELIB}/pymc3/step_methods/step_sizes.py
${PYSITELIB}/pymc3/step_methods/step_sizes.pyc
${PYSITELIB}/pymc3/step_methods/step_sizes.pyo
@@ -316,6 +283,9 @@
${PYSITELIB}/pymc3/tests/sampler_fixtures.py
${PYSITELIB}/pymc3/tests/sampler_fixtures.pyc
${PYSITELIB}/pymc3/tests/sampler_fixtures.pyo
+${PYSITELIB}/pymc3/tests/test_data_container.py
+${PYSITELIB}/pymc3/tests/test_data_container.pyc
+${PYSITELIB}/pymc3/tests/test_data_container.pyo
${PYSITELIB}/pymc3/tests/test_diagnostics.py
${PYSITELIB}/pymc3/tests/test_diagnostics.pyc
${PYSITELIB}/pymc3/tests/test_diagnostics.pyo
@@ -394,9 +364,6 @@
${PYSITELIB}/pymc3/tests/test_pickling.py
${PYSITELIB}/pymc3/tests/test_pickling.pyc
${PYSITELIB}/pymc3/tests/test_pickling.pyo
-${PYSITELIB}/pymc3/tests/test_plots.py
-${PYSITELIB}/pymc3/tests/test_plots.pyc
-${PYSITELIB}/pymc3/tests/test_plots.pyo
${PYSITELIB}/pymc3/tests/test_posdef_sym.py
${PYSITELIB}/pymc3/tests/test_posdef_sym.pyc
${PYSITELIB}/pymc3/tests/test_posdef_sym.pyo
@@ -415,9 +382,9 @@
${PYSITELIB}/pymc3/tests/test_sampling.py
${PYSITELIB}/pymc3/tests/test_sampling.pyc
${PYSITELIB}/pymc3/tests/test_sampling.pyo
-${PYSITELIB}/pymc3/tests/test_sgfs.py
-${PYSITELIB}/pymc3/tests/test_sgfs.pyc
-${PYSITELIB}/pymc3/tests/test_sgfs.pyo
+${PYSITELIB}/pymc3/tests/test_shape_handling.py
+${PYSITELIB}/pymc3/tests/test_shape_handling.pyc
+${PYSITELIB}/pymc3/tests/test_shape_handling.pyo
${PYSITELIB}/pymc3/tests/test_shared.py
${PYSITELIB}/pymc3/tests/test_shared.pyc
${PYSITELIB}/pymc3/tests/test_shared.pyo
diff -r 54e6b223d5e5 -r 9b5e2e7407ce math/py-pymc3/distinfo
--- a/math/py-pymc3/distinfo Sun Jun 16 19:14:52 2019 +0000
+++ b/math/py-pymc3/distinfo Sun Jun 16 19:17:23 2019 +0000
@@ -1,6 +1,6 @@
-$NetBSD: distinfo,v 1.2 2018/07/23 01:37:54 minskim Exp $
+$NetBSD: distinfo,v 1.3 2019/06/16 19:17:23 adam Exp $
-SHA1 (pymc3-3.5.tar.gz) = d5a699bafd327e455e96fc813915807c1cc86325
-RMD160 (pymc3-3.5.tar.gz) = 8fd3b10bf359a4462e1c7397e69b507e706f94b3
-SHA512 (pymc3-3.5.tar.gz) = 3f0dc51f0088d5262dbd8397a8a328f975718da6c45d4aca29b1e035f583dc0beb1dde7abbea5d459d428699bcb854acaec0680549fd8ba5bb168ca3050e94f6
-Size (pymc3-3.5.tar.gz) = 31996796 bytes
+SHA1 (pymc3-3.7.tar.gz) = 6faee9eaee99f0d1386a772bf053d0ad977a8dce
+RMD160 (pymc3-3.7.tar.gz) = 3286dbb723ef2025af308e7fad503f774b68be78
+SHA512 (pymc3-3.7.tar.gz) = 7efa3a86b7c9b34a9574faedb26396431168a63ba2c03e4680537ce5798105d6c3c273954f5c54de324015123fc0afa3b9ba8f88617a4e1f17924f66b5430a05
+Size (pymc3-3.7.tar.gz) = 30780326 bytes
Home |
Main Index |
Thread Index |
Old Index