Here we list the multiple options available to install scikit-multiflow.
scikit-multiflow
Notice: scikit-multiflow works with Python 3.5+ only.
scikit-multiflow requires numpy to be already installed in your system. There are multiple ways to install numpy, the easiest is using pip:
numpy
$ pip install -U numpy
From v0.5.0, Cython is also required, only when installing from the source code. Cython can also be installed using pip:
$ pip install -U Cython
First, you need to make a copy of the scikit-multiflow project. On the project’s GitHub page you will find on the top-right side of the page a green button with the label “Clone or download”. By clicking on it you will get two options: clone with SSH, HTTPS or download a zip. If you opt to get a zip file then you have to unzip the project into the desired local destination before continuing.
Dependencies: numpy and Cython (v0.5.0) are required in your system before proceeding with the installation of scikit-multiflow. Other dependencies will be automatically installed during the installation process.
Cython
In a terminal, navigate to the local path of the project and run the following command (including the dot at the end):
$ pip install -U .
The -U option indicates that the package will be installed only for this user.
-U
Optionally you can indicate to pip the remote location of the code:
pip
$ pip install -U git+https://github.com/scikit-multiflow/scikit-multiflow
When the installation is complete (and no errors are reported), then you are ready to use scikit-multiflow. The advantage of this option is that you can install the latest version of the code on GitHub.
scikit-multiflow is available via the Python Package Index (PyPI) here. So you can install it using the following command:
$ pip install -U scikit-multiflow
Note: This will install the latest (stable) release.
You can install scikit-multiflow from conda-forge using the following command:
$ conda install -c conda-forge scikit-multiflow
Docker images are located in the Docker Hub repository for scikit-multiflow .
You can download the image and start using scikit-multiflow. Image releases are tagged using the following format:
tag
Description
latest
stable release image
jupyter
same as stable with Jupyter
stable
devel
image tracking the latest version in the Github repository
devel-jupyter
same as devel with Jupyter
Download scikit-multiflow Docker image
$ docker pull skmultiflow/scikit-multiflow:latest
Start the scikit-multiflow Docker container
$ docker run -it skmultiflow/scikit-multiflow:latest
Run the Hoeffding Tree example
$ python hoeffding_tree.py
Also, for more examples see Quick-Start Guide with Docker
For people interested in contributing to scikit-multiflow we recommend to install the project in editable mode, please refer to the CONTRIBUTING page for further information.
You may need to change your matplotlib backend, because not all backends work on all machines.
matplotlib
If this is the case you need to check matplotlib’s configuration. In the matplotlibrc file you will need to change the line:
backend : Qt5Agg
to:
backend : a backend that works on your machine
The Qt5Agg backend should work with most machines, but a change may be needed.
In order to display plots from scikit-multiflow within a Jupyter Notebook we need to define the proper mathplotlib backend to use. This is done via a magic command at the beginning of the Notebook:
mathplotlib
%matplotlib notebook
JupyterLab is Jupyter’s next-generation user interface, currently in beta it can display plots with some caveats. If you use JupyterLab then the current solution is to use the jupyter-matplotlib extension:
%matplotlib ipympl