pyprobml

Python code for "Probabilistic Machine learning" book by Kevin Murphy

https://github.com/probml/pyprobml

Science Score: 36.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
    7 of 67 committers (10.4%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (12.9%) to scientific vocabulary

Keywords

blackjax colab flax jax jupyter-notebooks machine-learning numpyro pml probabilistic-programming pymc3 pyro pytorch tensorflow

Keywords from Contributors

hidden-markov-models kalman-filter state-space-models closember gtk qt tk wx
Last synced: 6 months ago · JSON representation

Repository

Python code for "Probabilistic Machine learning" book by Kevin Murphy

Basic Info
  • Host: GitHub
  • Owner: probml
  • License: mit
  • Language: Jupyter Notebook
  • Default Branch: master
  • Homepage:
  • Size: 4.88 GB
Statistics
  • Stars: 6,767
  • Watchers: 193
  • Forks: 1,561
  • Open Issues: 35
  • Releases: 1
Topics
blackjax colab flax jax jupyter-notebooks machine-learning numpyro pml probabilistic-programming pymc3 pyro pytorch tensorflow
Created over 9 years ago · Last pushed about 1 year ago
Metadata Files
Readme Changelog Contributing License Citation

README.md

pyprobml

Python 3 code to reproduce the figures in the books Probabilistic Machine Learning: An Introduction (aka "book 1") and Probabilistic Machine Learning: Advanced Topics (aka "book 2"). The code uses the standard Python libraries, such as numpy, scipy, matplotlib, sklearn, etc. Some of the code (especially in book 2) also uses JAX, and in some parts of book 1, we also use Tensorflow 2 and a little bit of Torch. See also probml-utils for some utility code that is shared across multiple notebooks.

For the latest status of the code, see Book 1 dashboard and Book 2 dashboard. As of September 2022, this code is now in maintenance mode.

Running the notebooks

The notebooks needed to make all the figures are available at the following locations.

Running notebooks in colab

Colab has most of the libraries you will need (e.g., scikit-learn, JAX) pre-installed, and gives you access to a free GPU and TPU. We have a created a colab intro notebook with more details. To run the notebooks on colab in any browser, you can go to a particular notebook on GitHub and change the domain from github.com to githubtocolab.com as suggested here. If you are using Google Chrome browser, you can use "Open in Colab" Chrome extension to do the same with a single click.

Running the notebooks locally

We assume you have already installed JAX and Tensorflow and Torch, since the details on how to do this depend on whether you have a CPU, GPU, etc.

You can use any of the following options to install the other requirements.

  • Option 1

bash pip install -r https://raw.githubusercontent.com/probml/pyprobml/master/requirements.txt

  • Option 2

Download requirements.txt locally to your path and run

bash pip install -r requirements.txt

  • Option 3

Run the following. (Note the --depth 1 prevents installing the whole history, which is very large). git clone --depth 1 https://github.com/probml/pyprobml.git Then install manually.

If you want to save the figures, you first need to execute something like this ```

export FIGDIR="/teamspace/studios/thisstudio/figures"

import os os.environ["FIGDIR"] = "/teamspace/studios/thisstudio/pyprobml/notebooks/figures" os.environ["DUAL_SAVE"] = "1" # both pdf and png ``` This is used by the savefig function to store pdf files.

Cloud computing

When you want more power or control than colab gives you, I recommend you use https://lightning.ai/docs/overview/studios, which makes it very easy to develop using VScode, running on a VM accessed from your web browser; you can then launch on one or more GPUs when needed with a single button click. Alternatively, if you are a power user, you can try Google Cloud Platform, which supports GPUs and TPUs; see this short tutorial on Colab, GCP and TPUs.

How to contribute

See this guide for how to contribute code. Please follow these guidelines to contribute new notebooks to the notebooks directory.

Metrics

Stargazers over time

GSOC

For a summary of some of the contributions to this codebase during Google Summer of Code (GSOC), see these links: 2021 and 2022.

Acknowledgements

For a list of contributors, see this list.

Owner

  • Name: Probabilistic machine learning
  • Login: probml
  • Kind: organization
  • Email: murphyk@gmail.com

Material to accompany my book series "Probabilistic Machine Learning" (Software, Data, Exercises, Figures, etc)

GitHub Events

Total
  • Issues event: 3
  • Watch event: 366
  • Issue comment event: 1
  • Push event: 5
  • Pull request event: 3
  • Fork event: 70
Last Year
  • Issues event: 3
  • Watch event: 366
  • Issue comment event: 1
  • Push event: 5
  • Pull request event: 3
  • Fork event: 70

Committers

Last synced: 12 months ago

All Time
  • Total Commits: 2,810
  • Total Committers: 67
  • Avg Commits per committer: 41.94
  • Development Distribution Score (DDS): 0.378
Past Year
  • Commits: 19
  • Committers: 2
  • Avg Commits per committer: 9.5
  • Development Distribution Score (DDS): 0.105
Top Committers
Name Email Commits
Kevin P Murphy m****k@g****m 1,747
Ang Ming Liang a****c@g****m 184
Karm Patel 5****l 127
Zeel B Patel p****l@i****n 95
Mahmoud Soliman m****s@a****u 93
karalleyna 3****a 77
Drishttii 3****i 67
Gerardo Durán-Martín g****n@m****m 61
Ashish Papanai a****0@g****m 47
Duane321 D****1@g****m 28
Srikar Jilugu 6****1 27
animesh-007 a****7@g****m 23
Nirzari gupta n****7@g****m 22
nappaillav v****8@g****m 13
Shivaditya Meduri 7****i 12
Vishal Ghoniya 9****5 12
Qingyao Sun s****5@i****m 12
dhruvpatel144 7****4 11
andrewnc a****6@g****m 10
John Fearns j****n@s****k 10
xinglong-li x****i@s****a 9
Abdelrahman350 e****d@g****m 8
Rohit Khoiwal 8****0 7
Nitish Sharma n****5@g****m 7
Taksh Panchal 5****l 7
Anand Hegde a****e@g****m 7
Shobhit Belwal 5****o 6
Garvit Chouhan 6****c 6
Kazuya Yamaguchi p****u@g****m 5
Madhav-Kanda 7****a 5
and 37 more...

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 69
  • Total pull requests: 40
  • Average time to close issues: about 1 month
  • Average time to close pull requests: 1 day
  • Total issue authors: 16
  • Total pull request authors: 16
  • Average comments per issue: 0.96
  • Average comments per pull request: 1.5
  • Merged pull requests: 38
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 3
  • Pull requests: 2
  • Average time to close issues: N/A
  • Average time to close pull requests: 18 minutes
  • Issue authors: 2
  • Pull request authors: 2
  • Average comments per issue: 0.0
  • Average comments per pull request: 0.0
  • Merged pull requests: 1
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • murphyk (39)
  • karm-patel (14)
  • g-i-o-r-g-i-o (2)
  • petergchang (2)
  • nsanghi (1)
  • AnsonSavage (1)
  • nickdgardner (1)
  • dfd (1)
  • patel-zeel (1)
  • willtryagain (1)
  • paulhorton (1)
  • apfvkajfv (1)
  • gerdm (1)
  • loneicewolf (1)
  • stellagra (1)
Pull Request Authors
  • patel-zeel (7)
  • karm-patel (7)
  • dhruvpatel144 (4)
  • Vishal987595 (3)
  • gerdm (3)
  • xinglong-li (3)
  • petergchang (2)
  • AnkitaKumariJain14 (2)
  • nsanghi (2)
  • nitish1295 (2)
  • willtryagain (1)
  • AnandShegde (1)
  • karalleyna (1)
  • rohit-khoiwal (1)
  • lkhphuc (1)
Top Labels
Issue Labels
Priority 1 (13) Priority 2 (5) internal (3) JSL (3) Figures (1)
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads: unknown
  • Total dependent packages: 0
  • Total dependent repositories: 1
  • Total versions: 1
proxy.golang.org: github.com/probml/pyprobml
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 1
Rankings
Forks count: 0.7%
Stargazers count: 0.9%
Average: 4.0%
Dependent repos count: 4.7%
Dependent packages count: 9.6%
Last synced: 6 months ago

Dependencies

.github/workflows/notebooks.yml actions
  • actions/cache v3 composite
  • actions/checkout v3 composite
  • actions/checkout v2 composite
  • actions/setup-python v2 composite
  • peaceiris/actions-gh-pages v3.6.1 composite