Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Machine Learning by (19k points)

Given a linearly separable dataset, is it necessarily better to use a hard margin SVM over a soft-margin SVM?

1 Answer

0 votes
by (33.1k points)

I’d say that Soft Margin SVM is better than Hard Margin SVM, because:

  • Hard Margin SVM is quite sensitive to outliers.

  • Soft Margin SVM  avoids iterating over outliers.

In the below diagram you can notice overfitting of hard margin SVM.

image

Soft-margin SVM can choose a decision boundary that has non-zero training error even if the dataset is linearly separable, and is less likely to overfit. You can notice that decreasing C value causes the classifier to leave linear separability in order to gain stability. 

image

You need to set the best value of C in SVM. The more optimal value of C will give you more accuracy.

Hope this answer helps.

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...