GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - lemidia/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.

BranchesTags
Open more actions menu
 
 

Latest commit

 

History

460 Commits
460 Commits

Folders and files

NameName
Last commit message
Last commit date
datasets
datasets
 
 
docker
docker
 
 
images
images
 
 
.gitignore
.gitignore
 
 
01_the_machine_learning_landscape.ipynb
01_the_machine_learning_landscape.ipynb
 
 
02_end_to_end_machine_learning_project.ipynb
02_end_to_end_machine_learning_project.ipynb
 
 
03_classification.ipynb
03_classification.ipynb
 
 
04_training_linear_models.ipynb
04_training_linear_models.ipynb
 
 
05_support_vector_machines.ipynb
05_support_vector_machines.ipynb
 
 
06_decision_trees.ipynb
06_decision_trees.ipynb
 
 
07_ensemble_learning_and_random_forests.ipynb
07_ensemble_learning_and_random_forests.ipynb
 
 
08_dimensionality_reduction.ipynb
08_dimensionality_reduction.ipynb
 
 
09_up_and_running_with_tensorflow.ipynb
09_up_and_running_with_tensorflow.ipynb
 
 
10_introduction_to_artificial_neural_networks.ipynb
10_introduction_to_artificial_neural_networks.ipynb
 
 
11_deep_learning.ipynb
11_deep_learning.ipynb
 
 
12_distributed_tensorflow.ipynb
12_distributed_tensorflow.ipynb
 
 
13_convolutional_neural_networks.ipynb
13_convolutional_neural_networks.ipynb
 
 
14_recurrent_neural_networks.ipynb
14_recurrent_neural_networks.ipynb
 
 
15_autoencoders.ipynb
15_autoencoders.ipynb
 
 
16_reinforcement_learning.ipynb
16_reinforcement_learning.ipynb
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
book_equations.ipynb
book_equations.ipynb
 
 
environment.yml
environment.yml
 
 
extra_autodiff.ipynb
extra_autodiff.ipynb
 
 
extra_capsnets-cn.ipynb
extra_capsnets-cn.ipynb
 
 
extra_capsnets.ipynb
extra_capsnets.ipynb
 
 
extra_gradient_descent_comparison.ipynb
extra_gradient_descent_comparison.ipynb
 
 
extra_tensorflow_reproducibility.ipynb
extra_tensorflow_reproducibility.ipynb
 
 
future_encoders.py
future_encoders.py
 
 
index.ipynb
index.ipynb
 
 
math_differential_calculus.ipynb
math_differential_calculus.ipynb
 
 
math_linear_algebra.ipynb
math_linear_algebra.ipynb
 
 
ml-project-checklist.md
ml-project-checklist.md
 
 
requirements.txt
requirements.txt
 
 
tensorflow_graph_in_jupyter.py
tensorflow_graph_in_jupyter.py
 
 
tools_matplotlib.ipynb
tools_matplotlib.ipynb
 
 
tools_numpy.ipynb
tools_numpy.ipynb
 
 
tools_pandas.ipynb
tools_pandas.ipynb
 
 

Repository files navigation

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:

  • Using jupyter.org's notebook viewer
    • note: github.com's notebook viewer also works but it is slower and the math formulas are not displayed correctly,
  • by cloning this repository and running Jupyter locally. This option lets you play around with the code. In this case, follow the installation instructions below,
  • or by running the notebooks in Deepnote. This allows you to play around with the code online in your browser. For example, here's a link to the first chapter:

Installation

First, you will need to install git, if you don't have it already.

Next, clone this repository by opening a terminal and typing the following commands:

$ cd $HOME  # or any other development directory you prefer
$ git clone https://github.com/ageron/handson-ml.git
$ cd handson-ml

If you do not want to install git, you can instead download master.zip, unzip it, rename the resulting directory to handson-ml and move it to your development directory.

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

If you are familiar with Python and you know how to install Python libraries, go ahead and install the libraries listed in requirements.txt and jump to the Starting Jupyter section. If you need detailed instructions, please read on.

Python & Required Libraries

Of course, you obviously need Python. Python 3 is already preinstalled on many systems nowadays. You can check which version you have by typing the following command (you may need to replace python3 with python):

$ python3 --version  # for Python 3

Any Python 3 version should be fine, preferably 3.5 or above. If you don't have Python 3, I recommend installing it. To do so, you have several options: on Windows or MacOSX, you can just download it from python.org. On MacOSX, you can alternatively use MacPorts or Homebrew. If you are using Python 3.6 on MacOSX, you need to run the following command to install the certifi package of certificates because Python 3.6 on MacOSX has no certificates to validate SSL connections (see this StackOverflow question):

$ /Applications/Python\ 3.6/Install\ Certificates.command

On Linux, unless you know what you are doing, you should use your system's packaging system. For example, on Debian or Ubuntu, type:

$ sudo apt-get update
$ sudo apt-get install python3 python3-pip

Another option is to download and install Anaconda. This is a package that includes both Python and many scientific libraries. You should prefer the Python 3 version.

If you choose to use Anaconda, read the next section, or else jump to the Using pip section.

Using Anaconda

Once you have installed Anaconda (or Miniconda), you can run the following command:

$ conda env create -f environment.yml

This will give you a conda environment named mlbook, ready to use! Just activate it and you will have everything setup for you:

$ conda activate mlbook

You are all set! Next, jump to the Starting Jupyter section.

Using pip

If you are not using Anaconda, you need to install several scientific Python libraries that are necessary for this project, in particular NumPy, Matplotlib, Pandas, Jupyter and TensorFlow (and a few others). For this, you can either use Python's integrated packaging system, pip, or you may prefer to use your system's own packaging system (if available, e.g. on Linux, or on MacOSX when using MacPorts or Homebrew). The advantage of using pip is that it is easy to create multiple isolated Python environments with different libraries and different library versions (e.g. one environment for each project). The advantage of using your system's packaging system is that there is less risk of having conflicts between your Python libraries and your system's other packages. Since I have many projects with different library requirements, I prefer to use pip with isolated environments. Moreover, the pip packages are usually the most recent ones available, while Anaconda and system packages often lag behind a bit.

These are the commands you need to type in a terminal if you want to use pip to install the required libraries. Note: in all the following commands, if you chose to use Python 2 rather than Python 3, you must replace pip3 with pip, and python3 with python.

First you need to make sure you have the latest version of pip installed:

$ python3 -m pip install --user --upgrade pip

The --user option will install the latest version of pip only for the current user. If you prefer to install it system wide (i.e. for all users), you must have administrator rights (e.g. use sudo python3 instead of python3 on Linux), and you should remove the --user option. The same is true of the command below that uses the --user option.

Next, you can optionally create an isolated environment. This is recommended as it makes it possible to have a different environment for each project (e.g. one for this project), with potentially very different libraries, and different versions:

$ python3 -m pip install --user --upgrade virtualenv
$ python3 -m virtualenv -p `which python3` env

This creates a new directory called env in the current directory, containing an isolated Python environment based on Python 3. If you installed multiple versions of Python 3 on your system, you can replace `which python3` with the path to the Python executable you prefer to use.

Now you must activate this environment. You will need to run this command every time you want to use this environment.

$ source ./env/bin/activate

On Windows, the command is slightly different:

$ .\env\Scripts\activate

Next, use pip to install the required python packages. If you are not using virtualenv, you should add the --user option (alternatively you could install the libraries system-wide, but this will probably require administrator rights, e.g. using sudo pip3 instead of pip3 on Linux).

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

Great! You're all set, you just need to start Jupyter now.

Starting Jupyter

Okay! You can now start Jupyter, simply type:

$ jupyter notebook

This should open up your browser, and you should see Jupyter's tree view, with the contents of the current directory. If your browser does not open automatically, visit 127.0.0.1:8888. Click on index.ipynb to get started!

Congrats! You are ready to learn Machine Learning, hands on!

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 Steven Bunkley and Ziembla who created the docker directory.

About

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

Resources

Readme
Apache-2.0 license
Activity

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.