Skip to content

Commit 4b25fa6

Browse files
committed
sgmcmc.py merge conflict fixed
2 parents 45a45ab + 2cb6f79 commit 4b25fa6

File tree

154 files changed

+15060
-6360
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

154 files changed

+15060
-6360
lines changed

.github/ISSUE_TEMPLATE.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
If you have questions about a specific use case, please post it to our discourse channel: https://discourse.pymc.io
2+
If you are not sure whether this is a bug or not, please also post it on discourse.
3+
4+
## Description of your problem
5+
6+
**Please provide a minimal, self-contained, and reproducible example.**
7+
8+
**Please provide the full traceback.**
9+
10+
**Please provide any additional information below.**
11+
12+
13+
## Versions and main components
14+
15+
* PyMC3 Version:
16+
* Theano Version:
17+
* Python Version:
18+
* Operating system:
19+
* How did you install PyMC3: (conda/pip)

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,8 @@ mcmc.sqlite
2424

2525
# Docker development
2626
# notebooks/
27+
28+
# air speed velocity (asv)
29+
benchmarks/env/
30+
benchmarks/html/
31+
benchmarks/results/

.pylintrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ enable=import-error,
4747
used-before-assignment,
4848
cell-var-from-loop,
4949
global-variable-undefined,
50+
dangerous-default-value,
5051
# redefined-builtin,
5152
redefine-in-handler,
5253
unused-import,

.travis.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,20 @@ cache:
77
- $HOME/minicoda2
88
- $HOME/minicoda3
99

10+
addons:
11+
apt_packages:
12+
- pandoc
13+
1014
before_install:
1115
- . ./scripts/install_miniconda.sh
1216
- sh -e /etc/init.d/xvfb start
1317
- export DISPLAY=":99.0"
1418

1519
install:
1620
- . ./scripts/create_testenv.sh
17-
- pip install coveralls pylint
21+
- pip install coveralls pylint
22+
- pip install travis-sphinx==2.0.0
23+
- pip install -r requirements-dev.txt
1824

1925
env:
2026
- PYTHON_VERSION=2.7 FLOATX='float32' TESTCMD="--durations=10 --ignore=pymc3/tests/test_examples.py --cov-append --ignore=pymc3/tests/test_distributions_random.py --ignore=pymc3/tests/test_variational_inference.py --ignore=pymc3/tests/test_shared.py --ignore=pymc3/tests/test_smc.py --ignore=pymc3/tests/test_updates.py --ignore=pymc3/tests/test_posteriors.py --ignore=pymc3/tests/test_sampling.py"
@@ -26,10 +32,13 @@ env:
2632
- PYTHON_VERSION=2.7 FLOATX='float64' TESTCMD="--durations=10 --cov-append pymc3/tests/test_examples.py pymc3/tests/test_posteriors.py"
2733
- PYTHON_VERSION=3.6 FLOATX='float64' TESTCMD="--durations=10 --cov-append --ignore=pymc3/tests/test_examples.py --ignore=pymc3/tests/test_distributions_random.py --ignore=pymc3/tests/test_variational_inference.py --ignore=pymc3/tests/test_shared.py --ignore=pymc3/tests/test_smc.py --ignore=pymc3/tests/test_updates.py --ignore=pymc3/tests/test_posteriors.py --ignore=pymc3/tests/test_sampling.py"
2834
- PYTHON_VERSION=3.6 FLOATX='float64' TESTCMD="--durations=10 --cov-append pymc3/tests/test_distributions_random.py pymc3/tests/test_shared.py pymc3/tests/test_smc.py pymc3/tests/test_sampling.py"
29-
- PYTHON_VERSION=3.6 FLOATX='float64' TESTCMD="--durations=10 --cov-append pymc3/tests/test_examples.py pymc3/tests/test_posteriors.py"
35+
- PYTHON_VERSION=3.6 FLOATX='float64' BUILD_DOCS="true" TESTCMD="--durations=10 --cov-append pymc3/tests/test_examples.py pymc3/tests/test_posteriors.py"
3036
- PYTHON_VERSION=3.6 FLOATX='float64' TESTCMD="--durations=10 --cov-append pymc3/tests/test_variational_inference.py pymc3/tests/test_updates.py"
37+
3138
script:
3239
- . ./scripts/test.sh $TESTCMD
40+
- . ./scripts/confirm_mpl_optional.sh
3341

3442
after_success:
43+
- if [[ "$BUILD_DOCS" == "true" ]]; then travis-sphinx deploy -c "docs.pymc.io"; fi
3544
- coveralls

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ PyMC is distributed under the Apache License, Version 2.0
66

77
Copyright (c) 2006 Christopher J. Fonnesbeck (Academic Free License)
88
Copyright (c) 2007-2008 Christopher J. Fonnesbeck, Anand Prabhakar Patil, David Huard (Academic Free License)
9-
Copyright (c) 2009-2013 The PyMC developers (see contributors to pymc-devs on GitHub)
9+
Copyright (c) 2009-2017 The PyMC developers (see contributors to pymc-devs on GitHub)
1010
All rights reserved.
1111

1212
Apache License

README.rst

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ which focuses on advanced Markov chain Monte Carlo and variational fitting
1010
algorithms. Its flexibility and extensibility make it applicable to a
1111
large suite of problems.
1212

13-
Check out the `getting started
14-
guide <http://pymc-devs.github.io/pymc3/notebooks/getting_started.html>`__!
13+
Check out the `getting started guide <http://docs.pymc.io/notebooks/getting_started>`__!
14+
1515

1616
Features
1717
========
@@ -38,10 +38,12 @@ Getting started
3838
If you already know about Bayesian statistics:
3939
----------------------------------------------
4040

41-
- `API quickstart guide <http://pymc-devs.github.io/pymc3/notebooks/api_quickstart.html>`__
42-
- The `PyMC3 tutorial <http://pymc-devs.github.io/pymc3/notebooks/getting_started.html>`__
43-
- `PyMC3 examples <http://pymc-devs.github.io/pymc3/examples.html>`__
44-
and the `API reference <http://pymc-devs.github.io/pymc3/api.html>`__
41+
42+
- `API quickstart guide <http://docs.pymc.io/notebooks/api_quickstart>`__
43+
- The `PyMC3 tutorial <http://docs.pymc.io/notebooks/getting_started>`__
44+
- `PyMC3 examples <http://docs.pymc.io/examples>`__ and the `API reference <http://docs.pymc.io/api>`__
45+
46+
4547

4648
Learn Bayesian statistics with a book together with PyMC3:
4749
----------------------------------------------------------
@@ -117,9 +119,9 @@ enables sparse scaling matrices which are useful for large problems.
117119
Citing PyMC3
118120
============
119121

120-
Salvatier J, Wiecki TV, Fonnesbeck C. (2016) Probabilistic programming
122+
Salvatier J., Wiecki T.V., Fonnesbeck C. (2016) Probabilistic programming
121123
in Python using PyMC3. PeerJ Computer Science 2:e55
122-
https://doi.org/10.7717/peerj-cs.55
124+
`DOI: 10.7717/peerj-cs.55 <https://doi.org/10.7717/peerj-cs.55>`__.
123125

124126
Contact
125127
=======

RELEASE-NOTES.md

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,80 @@
11
# Release Notes
22

3+
4+
## PyMC 3.3. (Unreleased)
5+
6+
### New features
7+
8+
- Improve NUTS initialization `advi+adapt_diag_grad` and add `jitter+adapt_diag_grad` (#2643)
9+
- Update loo, new improved algorithm (#2730)
10+
11+
### Fixes
12+
- Fixed `compareplot` to use `loo` output.
13+
- Add test for `model.logp_array` and `model.bijection` (#2724)
14+
- Fixed `sample_ppc` and `sample_ppc_w` to iterate all chains(#2633)
15+
- Add Bayesian R2 score (for GLMs) `stats.r2_score` (#2696) and test (#2729).
16+
17+
18+
19+
## PyMC3 3.2 (October 10, 2017)
20+
21+
### New features
22+
23+
This version includes two major contributions from our Google Summer of Code 2017 students:
24+
25+
* Maxim Kochurov extended and refactored the variational inference module. This primarily adds two important classes, representing operator variational inference (`OPVI`) objects and `Approximation` objects. These make it easier to extend existing `variational` classes, and to derive inference from `variational` optimizations, respectively. The `variational` module now also includes normalizing flows (`NFVI`).
26+
* Bill Engels added an extensive new Gaussian processes (`gp`) module. Standard GPs can be specified using either `Latent` or `Marginal` classes, depending on the nature of the underlying function. A Student-T process `TP` has been added. In order to accomodate larger datasets, approximate marginal Gaussian processes (`MarginalSparse`) have been added.
27+
28+
Documentation has been improved as the result of the project's monthly "docathons".
29+
30+
An experimental stochastic gradient Fisher scoring (`SGFS`) sampling step method has been added.
31+
32+
The API for `find_MAP` was enhanced.
33+
34+
SMC now estimates the marginal likelihood.
35+
36+
Added `Logistic` and `HalfFlat` distributions to set of continuous distributions.
37+
38+
Bayesian fraction of missing information (`bfmi`) function added to `stats`.
39+
40+
Enhancements to `compareplot` added.
41+
42+
QuadPotential adaptation has been implemented.
43+
44+
Script added to build and deploy documentation.
45+
46+
MAP estimates now available for transformed and non-transformed variables.
47+
48+
The `Constant` variable class has been deprecated, and will be removed in 3.3.
49+
50+
DIC and BPIC calculations have been sped up.
51+
52+
Arrays are now accepted as arguments for the `Bound` class.
53+
54+
`random` method was added to the `Wishart` and `LKJCorr` distributions.
55+
56+
Progress bars have been added to LOO and WAIC calculations.
57+
58+
All example notebooks updated to reflect changes in API since 3.1.
59+
60+
Parts of the test suite have been refactored.
61+
62+
### Fixes
63+
64+
Fixed sampler stats error in NUTS for non-RAM backends
65+
66+
Matplotlib is no longer a hard dependency, making it easier to use in settings where installing Matplotlib is problematic. PyMC will only complain if plotting is attempted.
67+
68+
Several bugs in the Gaussian process covariance were fixed.
69+
70+
All chains are now used to calculate WAIC and LOO.
71+
72+
AR(1) log-likelihood function has been fixed.
73+
74+
Slice sampler fixed to sample from 1D conditionals.
75+
76+
Several docstring fixes.
77+
378
## PyMC3 3.1 (June 23, 2017)
479

580
### New features

benchmarks/asv.conf.json

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
{
2+
// The version of the config file format. Do not change, unless
3+
// you know what you are doing.
4+
"version": 1,
5+
6+
// The name of the project being benchmarked
7+
"project": "pymc3",
8+
9+
// The project's homepage
10+
"project_url": "https://pymc-devs.github.io/pymc3/",
11+
12+
// The URL or local path of the source code repository for the
13+
// project being benchmarked
14+
"repo": "..",
15+
16+
// List of branches to benchmark. If not provided, defaults to "master"
17+
// (for git) or "tip" (for mercurial).
18+
"branches": ["master"],
19+
20+
// The DVCS being used. If not set, it will be automatically
21+
// determined from "repo" by looking at the protocol in the URL
22+
// (if remote), or by looking for special directories, such as
23+
// ".git" (if local).
24+
"dvcs": "git",
25+
26+
// The tool to use to create environments. May be "conda",
27+
// "virtualenv" or other value depending on the plugins in use.
28+
// If missing or the empty string, the tool will be automatically
29+
// determined by looking for tools on the PATH environment
30+
// variable.
31+
"environment_type": "conda",
32+
33+
// the base URL to show a commit for the project.
34+
"show_commit_url": "https://github.com/pymc-devs/pymc3/commit/",
35+
36+
// The Pythons you'd like to test against. If not provided, defaults
37+
// to the current version of Python used to run `asv`.
38+
"pythons": ["3.6"],
39+
40+
// The matrix of dependencies to test. Each key is the name of a
41+
// package (in PyPI) and the values are version numbers. An empty
42+
// list indicates to just test against the default (latest)
43+
// version.
44+
"matrix": {
45+
},
46+
47+
// The directory (relative to the current directory) that benchmarks are
48+
// stored in. If not provided, defaults to "benchmarks"
49+
"benchmark_dir": "benchmarks",
50+
51+
// The directory (relative to the current directory) to cache the Python
52+
// environments in. If not provided, defaults to "env"
53+
"env_dir": "env",
54+
55+
// The directory (relative to the current directory) that raw benchmark
56+
// results are stored in. If not provided, defaults to "results".
57+
"results_dir": "results",
58+
59+
// The directory (relative to the current directory) that the html tree
60+
// should be written to. If not provided, defaults to "html".
61+
"html_dir": "html",
62+
63+
// The number of characters to retain in the commit hashes.
64+
// "hash_length": 8,
65+
66+
// `asv` will cache wheels of the recent builds in each
67+
// environment, making them faster to install next time. This is
68+
// number of builds to keep, per environment.
69+
"wheel_cache_size": 2,
70+
71+
// The commits after which the regression search in `asv publish`
72+
// should start looking for regressions. Dictionary whose keys are
73+
// regexps matching to benchmark names, and values corresponding to
74+
// the commit (exclusive) after which to start looking for
75+
// regressions. The default is to start from the first commit
76+
// with results. If the commit is `null`, regression detection is
77+
// skipped for the matching benchmark.
78+
//
79+
// "regressions_first_commits": {
80+
// "some_benchmark": "352cdf", // Consider regressions only after this commit
81+
// "another_benchmark": null, // Skip regression detection altogether
82+
// }
83+
}

benchmarks/benchmarks/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+

0 commit comments

Comments
 (0)