All Projects → probml → Pyprobml

probml / Pyprobml

Licence: mit
Python code for "Machine learning: a probabilistic perspective" (2nd edition)

Programming Languages

python
139335 projects - #7 most used programming language
Jupyter Notebook
11667 projects

Projects that are alternatives of or similar to Pyprobml

dimensions-api-lab
Research data analytics tutorials using the Dimensions Analytics API
Stars: ✭ 68 (-98.38%)
Mutual labels:  colab, jupyter-notebooks
uvadlc notebooks
Repository of Jupyter notebook tutorials for teaching the Deep Learning Course at the University of Amsterdam (MSc AI), Fall 2022/Spring 2022
Stars: ✭ 901 (-78.53%)
Mutual labels:  flax, jax
omd
JAX code for the paper "Control-Oriented Model-Based Reinforcement Learning with Implicit Differentiation"
Stars: ✭ 43 (-98.98%)
Mutual labels:  flax, jax
Py
Repository to store sample python programs for python learning
Stars: ✭ 4,154 (-1.02%)
Mutual labels:  jupyter-notebook, jupyter-notebooks
get-started-with-JAX
The purpose of this repo is to make it easy to get started with JAX, Flax, and Haiku. It contains my "Machine Learning with JAX" series of tutorials (YouTube videos and Jupyter Notebooks) as well as the content I found useful while learning about the JAX ecosystem.
Stars: ✭ 229 (-94.54%)
Mutual labels:  flax, jax
Fastpages
An easy to use blogging platform, with enhanced support for Jupyter Notebooks.
Stars: ✭ 2,888 (-31.19%)
Mutual labels:  jupyter-notebook, jupyter-notebooks
jax-models
Unofficial JAX implementations of deep learning research papers
Stars: ✭ 108 (-97.43%)
Mutual labels:  flax, jax
Lucid
A collection of infrastructure and tools for research in neural network interpretability.
Stars: ✭ 4,344 (+3.5%)
Mutual labels:  jupyter-notebook, colab
koclip
KoCLIP: Korean port of OpenAI CLIP, in Flax
Stars: ✭ 80 (-98.09%)
Mutual labels:  flax, jax
chef-transformer
Chef Transformer 🍲 .
Stars: ✭ 29 (-99.31%)
Mutual labels:  flax, jax
Mit Deep Learning
Tutorials, assignments, and competitions for MIT Deep Learning related courses.
Stars: ✭ 8,912 (+112.34%)
Mutual labels:  jupyter-notebook, jupyter-notebooks
jax-resnet
Implementations and checkpoints for ResNet, Wide ResNet, ResNeXt, ResNet-D, and ResNeSt in JAX (Flax).
Stars: ✭ 61 (-98.55%)
Mutual labels:  flax, jax
Introtodeeplearning
Lab Materials for MIT 6.S191: Introduction to Deep Learning
Stars: ✭ 4,955 (+18.06%)
Mutual labels:  jupyter-notebook, jupyter-notebooks
Nbdev
Create delightful python projects using Jupyter Notebooks
Stars: ✭ 3,061 (-27.07%)
Mutual labels:  jupyter-notebook, jupyter-notebooks
Fastai
The fastai deep learning library
Stars: ✭ 21,718 (+417.46%)
Mutual labels:  jupyter-notebook, colab
jax-rl
JAX implementations of core Deep RL algorithms
Stars: ✭ 61 (-98.55%)
Mutual labels:  flax, jax
Transformers
🤗 Transformers: State-of-the-art Machine Learning for Pytorch, TensorFlow, and JAX.
Stars: ✭ 55,742 (+1228.14%)
Mutual labels:  flax, jax
Financial Models Numerical Methods
Collection of notebooks about quantitative finance, with interactive python code.
Stars: ✭ 3,534 (-15.8%)
Mutual labels:  jupyter-notebook, jupyter-notebooks
efficientnet-jax
EfficientNet, MobileNetV3, MobileNetV2, MixNet, etc in JAX w/ Flax Linen and Objax
Stars: ✭ 114 (-97.28%)
Mutual labels:  flax, jax
score flow
Official code for "Maximum Likelihood Training of Score-Based Diffusion Models", NeurIPS 2021 (spotlight)
Stars: ✭ 49 (-98.83%)
Mutual labels:  flax, jax

pyprobml

Python 3 code for the new book series Probabilistic Machine Learning by Kevin Patrick Murphy. This is work in progress, so expect rough edges.

Running the scripts

The scripts directory contains python files to generate individual figures from vol 1 and vol 2 of the book. To manually execute an individual script from the command line, follow this example:

git clone --depth 1 https://github.com/probml/pyprobml /pyprobml &> /dev/null
python3 pyprobml/scripts/softmax_plot.py 

This will clone the repo (without the version history, to save time/space), run the script, plot a figure, and save the result to the pyprobml/figures directory.

Many scripts rely on external packages, such as scipy, jax, etc. In some cases, the list of necessary packages is noted in the comments at the start of the file. However, rather than making the user install each dependency themselves, you can just install a single meta-package:

pip install superimport 

This needs to be done on your local machine (or once per colab instance). You then need to add import superimport to the top of each of your scripts. The superimport library will parse your file, figure out all missing packages, and then install them for you, before running the rest of the script as usual. (If you run the script a second time, it skips the installation step.) Thus you will need an internet connection to run the code.

Some scripts download datasets stored in the probml-data repo. Thus you will need an internet connection to run the code.

Jupyter notebooks

The scripts needed to make all the figures for each chapter are automatically combined together into a series of Jupyter notebooks, one per chapter.

In addition to the automatically generated notebooks, there are a series of manually created notebooks, which create additional figures, and provide supplementary material for the book. These are stored in the notebooks repo, since they can be quite large. Some of these notebooks use the scripts mentioned above, but others are independent of the book content.

Colab

The best way to run the code is inside Colab. This 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 intro to colab notebook with more details.

You can run the book code inside colab as shown in the example below.

%%capture
!pip install superimport 
!pip install deimport

!git clone --depth 1 https://github.com/probml/pyprobml /pyprobml &> /dev/null
%cd /pyprobml/scripts

%run kf_tracking_demo.py

To run code from github, follow the example below. (Note the raw in the URL.)

!wget -q https://raw.githubusercontent.com/probml/pyprobml/master/scripts/softmax_plot.py
%run softmax_plot.py

To edit a file locally and then run, follow the example below.

%load_ext autoreload
%autoreload 2

file = 'foo.py' # change this filename as needed
!touch $file # create  file if necessary
from google.colab import files
files.view(file) # open editor

%run $file

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, and get access to a TPU VM. You can then use this as a virtual desktop which you can access via ssh from inside VScode. We have created various tutorials on Colab, GCP and TPUs with more information.

How to contribute

See this guide for how to contribute code.

Metrics

Stargazers over time

GSOC 2021

For a summary of some of the contributions to this codebase during Google Summer of Code 2021, see this link.

Acknowledgements

I would like to thank the following people for contributing to the code (list autogenerated from this page):

murphyk mjsML Drishttii Duane321 gerdm animesh-007 Nirzu97 always-newbie161 karalleyna nappaillav jdf22 shivaditya-meduri Neoanarika andrewnc Abdelrahman350 Garvit9000c kzymgch alen1010 adamnemecek galv krasserm nealmcb petercerno Prahitha khanshehjad hieuza jlh2018 mvervuurt TripleTop
murphyk mjsML Drishttii Duane321 gerdm animesh-007 Nirzu97 always-newbie161 karalleyna nappaillav jdf22 shivaditya-meduri Neoanarika andrewnc Abdelrahman350 Garvit9000c kzymgch alen1010 adamnemecek galv krasserm nealmcb petercerno Prahitha khanshehjad hieuza jlh2018 mvervuurt TripleTop
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].