Git Product home page Git Product logo

pyprobml's Introduction

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
pip install -r https://raw.githubusercontent.com/probml/pyprobml/master/requirements.txt
  • Option 2

Download requirements.txt locally to your path and run

pip install -r requirements.txt
  • Option 3

Run

git clone --depth 1 https://github.com/probml/pyprobml.git

Then install manually.

GCP, TPUs, and all that

When you want more power or control than colab gives you, you should get a Google Cloud Platform (GCP) account (or you can use some other cloud provider, like Paperspace) to get a virtual machine with GPUs or TPUs. You can then use this as a virtual desktop which you can access via ssh from inside VScode. We have created a short tutorial on Colab, GCP and TPUs with more information.

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.

pyprobml's People

Contributors

murphyk avatar neoanarika avatar karm-patel avatar mjsml avatar patel-zeel avatar karalleyna avatar drishttii avatar gerdm avatar ashishpapanai avatar duane321 avatar always-newbie161 avatar animesh-007 avatar nirzu97 avatar nappaillav avatar johnfearns22 avatar vishal987595 avatar shivaditya-meduri avatar nalzok avatar dhruvpatel144 avatar andrewnc avatar xinglong-li avatar abdelrahman350 avatar anandshegde avatar nitish1295 avatar rohit-khoiwal avatar takshpanchal avatar garvit9000c avatar shobro avatar madhav-kanda avatar kzymgch avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.