If you've ever wanted to build a predictive model that learns the aspects of your data which make it fall into one category or another, then this is tutorial was written for you! In this tutorial, you learn some tools for better understands the dataset you are working with via visualization tools, data preprocessing tips, and dimensionality reduction options. You'll also learn about a classic Machine Learning (ML) algorithm known affectionately as SVM, or the Support Vector Machine model.
The two focuses of this article will walk you through:
Loading a datafile into a Numpy (multidimensional) array
Converting categorical "features" into numerical representation, "one-hot" encoding, and preparing the dataset for binary classification
Basic dimensionality reduction options and building intuition about what your data "looks like"
How to split your data into parts your model can be trained and tested on
How the SVM learns to separate your data into two classes
Special functions which help SVM learn to classify your data
How to build your classifier and test its performance
1) You have a basic understanding of what Machine Learning is or does (if not, please check out this excellent resource: )
2) Basic Python/coding skills (Numpy experience not necessary, but you should understand what a for-loop is or not be afraid to read the Python documentation)
3) You have some basic mathematics knowledge, are familiar with a vector, matrix, or can look up these definitions.
4) You have a dataset with binary classes (2 classes):
If not, we will be using the following datasets from the UC Irvine Machine Learning repository in this tutorial: