Skip to content
A series of Jupyter notebooks that walk you through the fundamentals of Machine Learning and Deep Learning in Python using Scikit-Learn, Keras and TensorFlow 2.
Jupyter Notebook
Branch: master
Clone or download
ageron Merge pull request #65 from patsancu/remove-hardcoded-recall-precisio…
…n-threshold-coordinates

remove hardcoded values for recall-precision-threshold intersection
Latest commit 47bbf77 Feb 4, 2020
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
datasets Fix vertical bars Jul 17, 2019
docker Remove pyvirtualdisplay from environment.yml and add it to the Docker… Nov 12, 2019
images Add breakout.gif May 28, 2019
work_in_progress Remove from __future__ imports as we move away from Python 2 Oct 12, 2019
.gitignore Add jsb_chorales dataset to .gitignore Nov 5, 2019
01_the_machine_learning_landscape.ipynb Revert "updated chapter 01" Jan 31, 2020
02_end_to_end_machine_learning_project.ipynb Make notebooks 1 to 9 runnable in Colab without changes Nov 5, 2019
03_classification.ipynb Merge pull request #65 from patsancu/remove-hardcoded-recall-precisio… Feb 4, 2020
04_training_linear_models.ipynb Make notebooks 1 to 9 runnable in Colab without changes Nov 5, 2019
05_support_vector_machines.ipynb Make notebooks 1 to 9 runnable in Colab without changes Nov 5, 2019
06_decision_trees.ipynb Make notebooks 1 to 9 runnable in Colab without changes Nov 5, 2019
07_ensemble_learning_and_random_forests.ipynb Make notebooks 1 to 9 runnable in Colab without changes Nov 5, 2019
08_dimensionality_reduction.ipynb Make notebooks 1 to 9 runnable in Colab without changes Nov 5, 2019
09_unsupervised_learning.ipynb Add solutions to chapter 9 code exercises Jan 26, 2020
10_neural_nets_with_keras.ipynb Add solutions to chapter 10 code exercises Jan 26, 2020
11_training_deep_neural_networks.ipynb Update 11_training_deep_neural_networks.ipynb Dec 26, 2019
12_custom_models_and_training_with_tensorflow.ipynb Rename Computing Gradients Using=>with Autodiff section to match book Dec 10, 2019
13_loading_and_preprocessing_data.ipynb Make notebook 13 runnable in Colab without changes Nov 6, 2019
14_deep_computer_vision_with_cnns.ipynb Make notebooks 14 to 19 runnable in Colab without changes Nov 6, 2019
15_processing_sequences_using_rnns_and_cnns.ipynb Make notebooks 14 to 19 runnable in Colab without changes Nov 6, 2019
16_nlp_with_rnns_and_attention.ipynb Make notebooks 14 to 19 runnable in Colab without changes Nov 6, 2019
17_autoencoders_and_gans.ipynb Upgrade packages, and add environment-windows.yml Dec 14, 2019
18_reinforcement_learning.ipynb Upgrade packages, and add environment-windows.yml Dec 14, 2019
19_training_and_deploying_at_scale.ipynb Make notebooks 14 to 19 runnable in Colab without changes Nov 6, 2019
INSTALL.md Spelling change in INSTALL.md Jan 31, 2020
LICENSE First notebook added: matplotlib Feb 16, 2016
README.md Simplify the installation instructions Dec 16, 2019
apt.txt Add apt.txt for Binder Oct 28, 2019
book_equations.ipynb Fix equation 16-6 (max_alpha'=>max_a') May 7, 2018
changes_in_2nd_edition.md First to do => First thing to do Sep 28, 2019
environment-windows.yml Fixes #73, tensorflow-addons and tensorflow-metadata installed via pi… Dec 16, 2019
environment.yml Fixes #73, tensorflow-addons and tensorflow-metadata installed via pi… Dec 16, 2019
extra_gradient_descent_comparison.ipynb Remove from __future__ imports as we move away from Python 2 Oct 12, 2019
index.ipynb Add 19_training_and_deploying_at_scale.ipynb, update index.ipynb Jul 13, 2019
math_linear_algebra.ipynb Merge pull request #85 from vasili111/patch-1 Feb 4, 2020
requirements.txt Bump tensorflow from 2.0.0 to 2.0.1 Jan 28, 2020
tools_matplotlib.ipynb Remove from __future__ imports as we move away from Python 2 Oct 12, 2019
tools_numpy.ipynb Remove from __future__ imports as we move away from Python 2 Oct 12, 2019
tools_pandas.ipynb Remove from __future__ imports as we move away from Python 2 Oct 12, 2019

README.md

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 the second edition of my O'Reilly book Hands-on Machine Learning with Scikit-Learn, Keras and TensorFlow:

Note: If you are looking for the first edition notebooks, check out ageron/handson-ml.

Quick Start

Want to play with these notebooks online without having to install anything?

Use any of the following services.

WARNING: Please be aware that these services provide temporary environments: anything you do will be deleted after a while, so make sure you download any data you care about.

  • Recommended: open this repository in Colaboratory:

  • Or open it in Binder:

    • Note: Most of the time, Binder starts up quickly and works great, but when handson-ml2 is updated, Binder creates a new environment from scratch, and this can take quite some time.
  • Or open it in Deepnote:

Just want to quickly look at some notebooks, without executing any code?

Browse this repository using jupyter.org's notebook viewer:

Note: github.com's notebook viewer also works but it is slower and the math equations are not always displayed correctly.

Want to run this project using a Docker image?

Read the Docker instructions.

Want to install this project on your own machine?

Start by installing Anaconda (or Miniconda), git, and if you have a TensorFlow-compatible GPU, install the GPU driver.

Next, clone this project by opening a terminal and typing the following commands (do not type the first $ signs on each line, they just indicate that these are terminal commands):

$ git clone https://github.com/ageron/handson-ml2.git
$ cd handson-ml2

If you want to use a GPU, then edit environment.yml (or environment-windows.yml on Windows) and replace tensorflow=2.0.0 with tensorflow-gpu=2.0.0. Also replace tensorflow-serving-api==2.0.0 with tensorflow-serving-api-gpu==2.0.0.

Next, run the following commands:

$ conda env create -f environment.yml # or environment-windows.yml on Windows
$ conda activate tf2
$ python -m ipykernel install --user --name=python3

Then if you're on Windows, run the following command:

$ pip install --no-index -f https://github.com/Kojoley/atari-py/releases atari_py

Finally, start Jupyter:

$ jupyter notebook

If you need further instructions, read the detailed installation instructions.

Contributors

I would like to thank everyone who contributed to this project, either by providing useful feedback, filing issues or submitting Pull Requests. Special thanks go to Haesun Park who helped on some of the exercise solutions, and to Steven Bunkley and Ziembla who created the docker directory.

You can’t perform that action at this time.