/handson-ml

A series of Jupyter notebooks that walk you through the fundamentals of Machine Learning and Deep Learning in python using Scikit-Learn and TensorFlow.

Primary LanguageJupyter NotebookApache License 2.0Apache-2.0

Machine Learning Notebooks

This project aims at teaching you the fundamentals of Machine Learning in python. It contains the example code and solutions to the exercises in my O'Reilly book Hands-on Machine Learning with Scikit-Learn and TensorFlow:

book

Simply open the Jupyter notebooks you are interested in:

Installation

Obviously, you will need git and python (python 3 is recommended, but python 2 should work as well).

First, clone this repository:

$ cd {your development directory}
$ git clone https://github.com/ageron/handson-ml.git
$ cd handson-ml

If you want an isolated environment (recommended), you can use virtualenv:

$ virtualenv env
$ source ./env/bin/activate

If you want to go through chapter 16 on Reinforcement Learning, you will need to install OpenAI gym and its dependencies for Atari simulations.

Then make sure pip is up to date, and use it to install the required python packages:

$ pip install --upgrade pip
$ pip install --upgrade -r requirements.txt

If you prefer to use Anaconda, you can run the following commands instead:

$ conda install -c conda-forge tensorflow=1.0.0
$ conda install -c conda-forge jupyter_contrib_nbextensions

If you want to install the Jupyter extensions, run the following command:

$ jupyter contrib nbextension install --user

Then you can activate an extension, such as the Table of Contents (2) extension:

$ jupyter nbextension enable toc2/main

Finally, launch Jupyter:

$ jupyter notebook

This should start the Jupyter server locally, and open your browser. If your browser does not open automatically, visit localhost:8888. Click on index.ipynb to get started. You can visit http://localhost:8888/nbextensions to activate and configure Jupyter extensions.

That's it! Have fun learning ML.