Lewis-Lu / pyprobml

Python code for "Machine learning: a probabilistic perspective"

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

pyprobml

Python 3 code for the second edition of my book "Machine learning: a probabilistic perspective" (http://people.cs.ubc.ca/~murphyk/MLbook/). This is work in progress, so expect rough edges.

Installation

We assume you have installed numpy, scipy, matplotlib, seaborn, pandas, scikit-learn, etc. (All of these are bundled with anaconda.)

Some scripts rely on additional libraries, such as the following:

You also need to define the PYPROBML environment variable. You can do this by adding the following line to your .bash_profile file, and then starting a new shell.

    export PYPROBML="/Users/kpmurphy/github/pyprobml" # replace with your download location

Scripts

Most of the code lives in the scripts directory. To execute a script, cd (change directory) to the scripts folder, and then type 'python foo.py'. You can also run each script from inside a Python IDE (like Spyder). Many of the scripts create plots, which are saved to PYROBML/figures.

Notebooks

We have created notebooks for some of the chapters to show how to convert the theory in the book into practice. (Work in progress...)

About

Python code for "Machine learning: a probabilistic perspective"

License:MIT License


Languages

Language:Jupyter Notebook 76.0%Language:Python 22.0%Language:TeX 1.8%Language:Makefile 0.1%Language:MATLAB 0.0%Language:M 0.0%