Multiclass classification using SVMs

SVMs are inherently two-class classifiers. In particular, the most prevalent method of multi-class classification in practice has been to create |C| one-versus-rest classifiers (commonly referred to as one-versus-all (OVA) classification) where |C| is the number of classes and to choose the class that classifies the test datum with the highest margin. Another approach is to develop a set of one-versus-one classifiers and to select the class that is chosen by the most classifiers. While this involves building |C|(|C| - 1)/2 classifiers, the time for training classifiers may decrease, since the training data set for each classifier is much smaller.

Now let's quickly jump onto how you can apply multi-class classification using SVMs with the help of a real-life dataset.

For the purpose of this section, we will work with the UCI Human Activity Recognition using smartphones dataset, which we are free to use for non-commercial purposes. So make sure not to use this in your groundbreaking autonomous start-up company before obtaining a corresponding software license.

The dataset can be obtained from the Kaggle website, https://www.kaggle.com/uciml/human-activity-recognition-with-smartphones. There you should find a Download button that leads you to a file called https://www.kaggle.com/uciml/human-activity-recognition-with-smartphones/downloads/human-activity-recognition-with-smartphones.zip/1.

However, if you followed our installation instructions from earlier and checked out the code on GitHub, you already have the dataset and are ready to go! The file can be found at notebooks/data/multiclass.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset