Python Machine Learning Snippets
Jupyter Notebook
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

Python Machine Learning Snippets (pymls)

Python Machine Learning Snippets (pymls) is an ongoing project. This project contains various machine learning examples as Jupyter Notebooks with scikit-learn, statsmodel, numpy and other libraries. The examples are tested with Python 3.6.x.

Note: This is an ongoing project and is far away from complete.

Get started...

To get started you can choose one of the these approaches:

  • create a virtual environment with virtualenv and install the required packages with pip
  • create a new conda environment and install the packges with conda install
  • use the docker image rueedlinger/pyml ( which has all required packages already installed.

First you should get a copy of this project. To do this just use the git clone or fork command.

git clone


The next example shows how to create an environment with "virtualenv" ( and install the required packages.

virtualenv --python=/usr/bin/python3.6 py36-ml

source py36-ml/bin/activate

pip install -r requirements.txt


Another aproach is to create an environment with conda ( and the required packages.

conda create -n py36-ml python=3.6

source activate py36-ml

pip install -r requirements.txt


You can just start the Docker image with the following command.

docker run -v /path/to/notebooks:/notebooks -p8888:8888 -it rueedlinger/pyml:0.3

With the -v flag you can specify where the volume is mounted on your local machine. This should point to the location where the notebooks are stored. The Juypter Notebook is running on port 8888. To change the port mapping to the container you can us the -p. To use the latest image you can change the tag 0.3 to latest.

Or use the bash script with linux or mac which will start the Jupyter notebook and mount the voulme '/notebook'.


Next you shoud see the following output in the command line.

    Copy/paste this URL into your browser when you connect for the first time,
    to login with a token:

To connect to the Jupyter Notebook you have to copy/paste this URL into your browser.

The snippets...

At the moment there are the following machine learning snippets available as Jupyter (Python) Notebook.