Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 0f000a2

Browse filesBrowse files
authored
Merge pull request #15 from pymc-learn/dev
Dev
2 parents 17a7f6e + c2fc524 commit 0f000a2
Copy full SHA for 0f000a2

File tree

Expand file treeCollapse file tree

4 files changed

+94
-24
lines changed
Filter options
Expand file treeCollapse file tree

4 files changed

+94
-24
lines changed

‎.travis.yml

Copy file name to clipboardExpand all lines: .travis.yml
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ install:
2424
env:
2525
- PYTHON_VERSION=2.7 FLOATX='float64' RUN_PYLINT="true" TESTCMD="--durations=50 --cov-append pmlearn/tests/test_base.py pmlearn/linear_model/tests/test_base.py pmlearn/linear_model/tests/test_logistic.py --ignore=pmlearn/gaussian_process/tests/test_gpr.py --ignore=pmlearn/mixture/tests/test_gaussian_mixture.py --ignore=pmlearn/mixture/tests/test_dirichlet_process.py --ignore=pmlearn/naive_bayes/tests/test_naive_bayes.py --ignore=pmlearn/neural_network/test_multilayer_perceptron.py"
2626
- PYTHON_VERSION=2.7 FLOATX='float64' RUN_PYLINT="true" TESTCMD="--durations=50 --cov-append pmlearn/tests/test_base.py --ignore=pmlearn/linear_model/tests/test_base.py --ignore=pmlearn/linear_model/tests/test_logistic.py pmlearn/gaussian_process/tests/test_gpr.py --ignore=pmlearn/mixture/tests/test_gaussian_mixture.py --ignore=pmlearn/mixture/tests/test_dirichlet_process.py --ignore=pmlearn/naive_bayes/tests/test_naive_bayes.py --ignore=pmlearn/neural_network/test_multilayer_perceptron.py"
27+
- PYTHON_VERSION=3.5 FLOATX='float64' RUN_PYLINT="true" TESTCMD="--durations=50 --cov-append pmlearn/tests/test_base.py pmlearn/linear_model/tests/test_base.py pmlearn/linear_model/tests/test_logistic.py --ignore=pmlearn/gaussian_process/tests/test_gpr.py --ignore=pmlearn/mixture/tests/test_gaussian_mixture.py --ignore=pmlearn/mixture/tests/test_dirichlet_process.py --ignore=pmlearn/naive_bayes/tests/test_naive_bayes.py --ignore=pmlearn/neural_network/test_multilayer_perceptron.py"
28+
- PYTHON_VERSION=3.5 FLOATX='float64' RUN_PYLINT="true" TESTCMD="--durations=50 --cov-append pmlearn/tests/test_base.py --ignore=pmlearn/linear_model/tests/test_base.py --ignore=pmlearn/linear_model/tests/test_logistic.py pmlearn/gaussian_process/tests/test_gpr.py --ignore=pmlearn/mixture/tests/test_gaussian_mixture.py --ignore=pmlearn/mixture/tests/test_dirichlet_process.py --ignore=pmlearn/naive_bayes/tests/test_naive_bayes.py --ignore=pmlearn/neural_network/test_multilayer_perceptron.py"
29+
- PYTHON_VERSION=3.5 FLOATX='float64' RUN_PYLINT="true" TESTCMD="--durations=50 --cov-append pmlearn/tests/test_base.py pmlearn/linear_model/tests/test_base.py pmlearn/linear_model/tests/test_logistic.py --ignore=pmlearn/gaussian_process/tests/test_gpr.py --ignore=pmlearn/mixture/tests/test_gaussian_mixture.py --ignore=pmlearn/mixture/tests/test_dirichlet_process.py --ignore=pmlearn/naive_bayes/tests/test_naive_bayes.py --ignore=pmlearn/neural_network/test_multilayer_perceptron.py"
30+
- PYTHON_VERSION=3.5 FLOATX='float64' RUN_PYLINT="true" TESTCMD="--durations=50 --cov-append pmlearn/tests/test_base.py --ignore=pmlearn/linear_model/tests/test_base.py --ignore=pmlearn/linear_model/tests/test_logistic.py pmlearn/gaussian_process/tests/test_gpr.py --ignore=pmlearn/mixture/tests/test_gaussian_mixture.py --ignore=pmlearn/mixture/tests/test_dirichlet_process.py --ignore=pmlearn/naive_bayes/tests/test_naive_bayes.py --ignore=pmlearn/neural_network/test_multilayer_perceptron.py"
2731
- PYTHON_VERSION=3.6 FLOATX='float64' RUN_PYLINT="true" TESTCMD="--durations=50 --cov-append pmlearn/tests/test_base.py pmlearn/linear_model/tests/test_base.py pmlearn/linear_model/tests/test_logistic.py --ignore=pmlearn/gaussian_process/tests/test_gpr.py --ignore=pmlearn/mixture/tests/test_gaussian_mixture.py --ignore=pmlearn/mixture/tests/test_dirichlet_process.py --ignore=pmlearn/naive_bayes/tests/test_naive_bayes.py --ignore=pmlearn/neural_network/test_multilayer_perceptron.py"
2832
- PYTHON_VERSION=3.6 FLOATX='float64' RUN_PYLINT="true" TESTCMD="--durations=50 --cov-append pmlearn/tests/test_base.py --ignore=pmlearn/linear_model/tests/test_base.py --ignore=pmlearn/linear_model/tests/test_logistic.py pmlearn/gaussian_process/tests/test_gpr.py --ignore=pmlearn/mixture/tests/test_gaussian_mixture.py --ignore=pmlearn/mixture/tests/test_dirichlet_process.py --ignore=pmlearn/naive_bayes/tests/test_naive_bayes.py --ignore=pmlearn/neural_network/test_multilayer_perceptron.py"
2933
- PYTHON_VERSION=3.6 FLOATX='float64' RUN_PYLINT="true" TESTCMD="--durations=50 --cov-append pmlearn/tests/test_base.py pmlearn/linear_model/tests/test_base.py pmlearn/linear_model/tests/test_logistic.py --ignore=pmlearn/gaussian_process/tests/test_gpr.py --ignore=pmlearn/mixture/tests/test_gaussian_mixture.py --ignore=pmlearn/mixture/tests/test_dirichlet_process.py --ignore=pmlearn/naive_bayes/tests/test_naive_bayes.py --ignore=pmlearn/neural_network/test_multilayer_perceptron.py"

‎CONTRIBUTING.rst

Copy file name to clipboardExpand all lines: CONTRIBUTING.rst
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ For the most part, this library follows PEP8 with a couple of exceptions.
104104
Notes:
105105

106106
- Indent with 4 spaces
107-
- Lines can be 120 characters long
107+
- Lines should be a maximum of 80 characters long
108108
- Docstrings should be written as numpy docstrings
109109
- Your code should be Python 3 compatible
110110
- When in doubt, follow the style of the existing code

‎README.rst

Copy file name to clipboardExpand all lines: README.rst
+34-18Lines changed: 34 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,15 @@ What is pymc-learn?
2727
*pymc-learn is a library for practical probabilistic
2828
machine learning in Python*.
2929

30-
It provides probabilistic models in a syntax that mimics
31-
`scikit-learn <http://scikit-learn.org>`_.
30+
It provides a variety of state-of-the art probabilistic models for supervised
31+
and unsupervised machine learning. **It is inspired by**
32+
`scikit-learn <http://scikit-learn.org>`_ **and focuses on bringing probabilistic
33+
machine learning to non-specialists**. It uses a syntax that mimics scikit-learn.
34+
Emphasis is put on ease of use, productivity, flexibility, performance,
35+
documentation, and an API consistent with scikit-learn. It depends on scikit-learn
36+
and `PyMC3 <https://docs.pymc.io/>`_ and is distributed under the new BSD-3 license,
37+
encouraging its use in both academia and industry.
38+
3239
Users can now have calibrated quantities of uncertainty in their models
3340
using powerful inference algorithms -- such as MCMC or Variational inference --
3441
provided by `PyMC3 <https://docs.pymc.io/>`_.
@@ -63,19 +70,29 @@ parameters and predictions.
6370
Quick Install
6471
-----------------
6572

66-
You can install ``pymc-learn`` from source as follows:
73+
You can install ``pymc-learn`` from PyPi using pip as follows:
74+
75+
.. code-block:: bash
76+
77+
pip install pymc-learn
78+
79+
80+
Or from source as follows:
6781

6882
.. code-block:: bash
6983
7084
pip install git+https://github.com/pymc-learn/pymc-learn
7185
7286
87+
.. CAUTION::
88+
``pymc-learn`` is under heavy development.
89+
7390
Dependencies
7491
................
7592

7693
``pymc-learn`` is tested on Python 2.7, 3.5 & 3.6 and depends on Theano,
77-
PyMC3, NumPy, SciPy, and Matplotlib (see ``requirements.txt`` for version
78-
information).
94+
PyMC3, Scikit-learn, NumPy, SciPy, and Matplotlib (see ``requirements.txt``
95+
for version information).
7996

8097
----
8198

@@ -92,9 +109,9 @@ Quick Start
92109
>>> X, y = make_friedman2(n_samples=500, noise=0, random_state=0)
93110
>>> kernel = DotProduct() + WhiteKernel()
94111
>>> gpr = GaussianProcessRegressor(kernel=kernel).fit(X, y)
95-
>>> gpr.score(X, y) # doctest: +ELLIPSIS
112+
>>> gpr.score(X, y)
96113
0.3680...
97-
>>> gpr.predict(X[:2,:], return_std=True) # doctest: +ELLIPSIS
114+
>>> gpr.predict(X[:2,:], return_std=True)
98115
(array([653.0..., 592.1...]), array([316.6..., 316.6...]))
99116
100117
----
@@ -124,18 +141,18 @@ Citing pymc-learn
124141

125142
To cite ``pymc-learn`` in publications, please use the following::
126143

127-
Pymc-learn Developers Team (2019). pymc-learn: Practical probabilistic machine
128-
learning in Python. arXiv preprint arXiv:xxxx.xxxxx. Forthcoming.
144+
Emaasit, Daniel (2018). Pymc-learn: Practical probabilistic machine
145+
learning in Python. arXiv preprint arXiv:1810.xxxxx.
129146

130147
Or using BibTex as follows:
131148

132149
.. code-block:: latex
133150

134-
@article{Pymc-learn,
135-
title={pymc-learn: Practical probabilistic machine learning in {P}ython},
136-
author={Pymc-learn Developers Team},
137-
journal={arXiv preprint arXiv:xxxx.xxxxx},
138-
year={2019}
151+
@article{emaasit2018pymc,
152+
title={Pymc-learn: Practical probabilistic machine learning in {P}ython},
153+
author={Emaasit, Daniel and others},
154+
journal={arXiv preprint arXiv:1810.xxxxx},
155+
year={2018}
139156
}
140157

141158
If you want to cite ``pymc-learn`` for its API, you may also want to consider
@@ -186,8 +203,7 @@ Index
186203
**User Guide**
187204

188205
The main documentation. This contains an in-depth description of all models
189-
and how to apply them. ``pymc-learn`` leverages the Base template provided by the PyMC3 Models
190-
project: https://github.com/parsing-science/pymc3_models.
206+
and how to apply them.
191207

192208
* :doc:`user_guide`
193209

@@ -225,8 +241,8 @@ in a familiar scikit-learn syntax.
225241

226242
**API Reference**
227243

228-
``pymc-learn`` leverages the Base template provided by the PyMC3 Models
229-
project: https://github.com/parsing-science/pymc3_models.
244+
``pymc-learn`` leverages and extends the Base template provided by the PyMC3
245+
Models project: https://github.com/parsing-science/pymc3_models.
230246

231247
* :doc:`api`
232248

‎docs/why.rst

Copy file name to clipboardExpand all lines: docs/why.rst
+55-5Lines changed: 55 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ you may be compelled to use ``pymc-learn``.
1414
pymc-learn prioritizes user experience
1515
---------------------------------------
1616

17-
- ``pymc-learn`` mimics the syntax of `scikit-learn <https://scikit-learn.org>`_ -- a popular Python library for machine learning -- which has a consistent & simple API, and is very user friendly.
17+
- *Familiarity*: ``pymc-learn`` mimics the syntax of `scikit-learn <https://scikit-learn.org>`_ -- a popular Python library for machine learning -- which has a consistent & simple API, and is very user friendly.
1818

19-
- This makes ``pymc-learn`` easy to learn and use for first-time users.
19+
- *Ease of use*: This makes ``pymc-learn`` easy to learn and use for first-time users.
2020

21-
- For scikit-learn users, you don't have to completely rewrite your code. Your code looks almost the same. You are more productive, allowing you to try more ideas faster.
21+
- *Productivity*: For scikit-learn users, you don't have to completely rewrite your code. Your code looks almost the same. You are more productive, allowing you to try more ideas faster.
2222

2323
.. code-block:: python
2424
@@ -27,12 +27,56 @@ pymc-learn prioritizes user experience
2727
lr = LinearRegression() lr = LinearRegression()
2828
lr.fit(X, y) lr.fit(X, y)
2929
30-
- This ease of use does not come at the cost of reduced flexibility: because ``pymc-learn`` integrates with `PyMC3 <https://docs.pymc.io>`_, it enables you to implement anything you could have built in the base language.
30+
- *Flexibility*: This ease of use does not come at the cost of reduced flexibility. Given that ``pymc-learn`` integrates with `PyMC3 <https://docs.pymc.io>`_, it enables you to implement anything you could have built in the base language.
3131

32+
- *Performance*. The primary inference algorithm is gradient-based automatic differentiation variational inference (ADVI) (Kucukelbir et al., 2017), which estimates a divergence measure between approximate and true posterior distributions. Pymc-learn scales to complex, high-dimensional models thanks to GPU-accelerated tensor math and reverse-mode automatic differentiation via Theano (Theano Development Team, 2016), and it scales to large datasets thanks to estimates computed over mini-batches of data in ADVI.
3233

3334
----
3435

3536

37+
Why do we need pymc-learn?
38+
--------------------------
39+
Currently, there is a growing need for principled machine learning approaches by
40+
non-specialists in many fields including the pure sciences (e.g. biology, physics,
41+
chemistry), the applied sciences (e.g. political science, biostatistics),
42+
engineering (e.g. transportation, mechanical), medicine (e.g. medical imaging),
43+
the arts (e.g visual art), and software industries.
44+
45+
This has lead to increased adoption of probabilistic modeling. This trend is
46+
attributed in part to three major factors:
47+
48+
(1) the need for transparent models with calibrated quantities of uncertainty, i.e. "models should know when they don't know",
49+
50+
(2) the ever-increasing number of promising results achieved on a variety of fundamental problems in AI (Ghahramani, 2015), and
51+
52+
(3) the emergency of probabilistic programming languages (PPLs) that provide a fexible framework to build richly structured probabilistic models that incorporate domain knowledge.
53+
54+
However, usage of PPLs requires a specialized understanding of probability
55+
theory, probabilistic graphical modeling, and probabilistic inference. Some PPLs
56+
also require a good command of software coding. These requirements make it
57+
difficult for non-specialists to adopt and apply probabilistic machine learning
58+
to their domain problems.
59+
60+
``Pymc-learn`` seeks to address these challenges by providing state-of-the art
61+
implementations of several popular probabilistic machine learning models.
62+
**It is inspired by scikit-learn** (Pedregosa et al., 2011) **and focuses on
63+
bringing probabilistic machine learning to non-specialists**. It puts emphasis
64+
on:
65+
66+
(1) ease of use,
67+
68+
(2) productivity,
69+
70+
(3) fexibility,
71+
72+
(4) performance,
73+
74+
(5) documentation, and
75+
76+
(6) an API consistent with scikit-learn.
77+
78+
The underlying probabilistic models are built using pymc3 (Salvatier et al., 2016).
79+
3680

3781
Python is the lingua franca of Data Science
3882
--------------------------------------------
@@ -137,4 +181,10 @@ References
137181

138182
4. Barber, D. (2012). Bayesian reasoning and machine learning. Cambridge University Press.
139183

140-
5. Salvatier, J., Wiecki, T. V., & Fonnesbeck, C. (2016). Probabilistic programming in Python using PyMC3. PeerJ Computer Science, 2, e55.
184+
5. Salvatier, J., Wiecki, T. V., & Fonnesbeck, C. (2016). Probabilistic programming in Python using PyMC3. PeerJ Computer Science, 2, e55.
185+
186+
6. Alp Kucukelbir, Dustin Tran, Rajesh Ranganath, Andrew Gelman, and David M Blei. Automatic differentiation variational inference. The Journal of Machine Learning Research, 18(1):430{474, 2017.
187+
188+
7. Fabian Pedregosa, Gael Varoquaux, Alexandre Gramfort, Vincent Michel, Bertrand Thirion, Olivier Grisel, Mathieu Blondel, Peter Prettenhofer, Ron Weiss, Vincent Dubourg, et al. Scikit-learn: Machine learning in python. Journal of machine learning research, 12(Oct): 2825-2830, 2011.
189+
190+
8. Theano Development Team. Theano: A Python framework for fast computation of mathematical expressions. arXiv e-prints, abs/1605.02688, May 2016. URL http://arxiv.org/abs/1605.02688.

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.