2081 8

CSC420 ยท 2081 ยท 5 marks

What is support vector? How do you evaluate the accuracy of a classifier? Describe.

What is support vector? How do you evaluate the accuracy of a classifier? Describe. [5]

Data Warehousing and Data MiningChapter 6: Classification and PredictionSupport vector machine

Quick answer

A Support Vector Machine (SVM) is a supervised learning algorithm used primarily for classification problems. It works by finding the optimal hyperplane that best separates data points belonging to different classes.

Support Vector and Classifier Accuracy Evaluation


Part 1: What is a Support Vector?

Support Vectors are the data points that lie closest to the decision boundary (hyperplane). These are the critical points that directly influence the position and orientation of the hyperplane.

Key points about support vectors:

  • They are the boundary data points from each class
  • The margin is defined as the distance between the hyperplane and the nearest support vectors from each class
  • SVM aims to maximize this margin to achieve the best separation
  • Removing support vectors would change the position of the hyperplane
  • SVM takes input data points and outputs the hyperplane (decision boundary) that separates the classes

Example: If the hyperplane equation is 2x - 2 = 0, the support vectors are the points that satisfy the margin constraints on either side of this boundary.


Part 2: Evaluating the Accuracy of a Classifier

Confusion Matrix

A Confusion Matrix is an N x N matrix used to evaluate the performance of a classification model, where N is the number of target classes.

For a binary classification, it is a 2 x 2 matrix:

Predicted: PositivePredicted: Negative
Actual: PositiveTP (True Positive)FN (False Negative)
Actual: NegativeFP (False Positive)TN (True Negative)

Definitions:

  • TP (True Positive): Both actual and predicted classes are positive (correctly classified positive)
  • TN (True Negative): Both actual and predicted classes are negative (correctly classified negative)
  • FP (False Positive): Predicted positive but actually negative -- called Type I Error
  • FN (False Negative): Predicted negative but actually positive -- called Type II Error

Four Performance Measures

1. Accuracy

$$\text{Accuracy} = \frac{TP + TN}{TP + TN + FP + FN}$$ Measures the overall proportion of correctly classified instances.

2. Precision

$$\text{Precision} = \frac{TP}{TP + FP}$$ Measures how many of the predicted positives are actually positive.

3. Recall (Sensitivity)

$$\text{Recall} = \frac{TP}{TP + FN}$$ Measures how many of the actual positives were correctly identified.

4. F1-Score

$$\text{F1-Score} = \frac{2 \times \text{Precision} \times \text{Recall}}{\text{Precision} + \text{Recall}}$$ The harmonic mean of Precision and Recall; useful when there is a class imbalance.


Summary Table

MeasureFormulaWhat it tells
Accuracy(TP+TN)/(TP+TN+FP+FN)Overall correctness
PrecisionTP/(TP+FP)Quality of positive predictions
RecallTP/(TP+FN)Coverage of actual positives
F1-Score2PR/(P+R)Balance between precision and recall

These four measures together provide a comprehensive evaluation of a classifier's performance beyond simple accuracy.

Short on time? The 1, 5 and 10 mark versions of this answer, flashcards and practice sets come with a program pass.