Support Vector Machine (SVM) Learning Algorithm


Introduction

Our dataset consisted of 101 different zoo animals with 16 different boolean attributes.

From these attributes, animals were then placed in 1 of 7 categories such as mammal, fish, or insect.

To implement a Support Vector Machine for building a multi-class classifier our team used two kernel functions, Polynomial and Radial Basis Function (RBF), and assessed the accuracy of each.

Implementation for a multi-classification model using a Radial Basis Function (RBF) Kernel


rbf_kernel_svm
  • 67% of the time, the animal type was predicted correctly (Accuracy)
  • 67% of animal classifications were correctly predicted (Recall)
  • Overall 54% harmonic average of precision and recall (F1 Score)

A confusion matrix was used to evaluate the performance of the SVM Model using the RBF Kernel and returned the matrix below:


rbf_confusion_matrix

This matrix shows the holistic view of how well our classification model performed and what kinds of errors it made. Due to the size of our dataset, the confusion matrix did not find any animals classified as an amphibian in the test set and returned an errant matrix.

Implementation for a multi-classification model using a Polynomial Kernel


poly_kernel_svm
  • 86% of the time, the animal type was predicted correctly (Accuracy)
  • 86% of animal classifications were correctly predicted (Recall)
  • Overall 84% harmonic average of precision and recall (F1 Score)

A confusion matrix was used to evaluate the performance of the SVM Model using the Polynomial Kernel and returned the matrix below:


poly_confusion_matrix

This matrix shows the holistic view of how well our classification model performed and what kinds of errors it made. Due to the size of our dataset, the confusion matrix did not find any animals classified as an amphibian in the test set and returned an errant matrix.