Understanding support vector machines
Create the Workspace
First you will need to have Python installed. It is probably already installed on your system. If not, you can get it at https://www.python.org/.1
Next you need to create a workspace directory for your Machine Learning code and datasets. Open a terminal and type the following commands (after the $
prompts):
$ export ML_PATH="$HOME/ml" # You can change the path if you prefer
$ mkdir -p $ML_PATH
You will need a number of Python modules: Jupyter, NumPy, Pandas, Matplotlib, and Scikit-Learn. If you don’t have them yet, there are many ways to install them (and their dependencies). You can use your system’s packaging system (e.g., apt-get on Ubuntu, or MacPorts or HomeBrew on macOS), install a Scientific Python distribution such as Anaconda and use its packaging system, or just use Python’s own packaging system, pip, which is included by default with the Python binary installers (since Python 2.7.9).2 You can check to see if pip is installed by typing the following command:
$ pip3 --version
pip 9.0.1 from [...]/lib/python3.5/site-packages (python 3.5)
You should make sure you have a recent version of pip installed, at the very least >1.4 to support binary module installation (a.k.a. wheels). To upgrade the pip module, type:3
$ pip3 install --upgrade pip
Collecting pip
[...]
Successfully installed pip-9.0.1
Get Understanding support vector machines now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.