Ali
Ali

Reputation: 955

SVM and Invalid category

I would like to have an invalid category in my SVM classification. For example considering fruit classification, I want to have APPLE, ORANGE, BANANA and 'NOT FRUIT' (invalid). I was wondering if it's better to create a binary SVM classifier for each category (one for APPLE one for ORANGE, etc) or create a SVM classifier with the invalid category as one of the classes and feed it with invalid training data.

To be a bit more specific, I have a classifier that categorizes time series data. I need to classify some of the fed time series to invalid categories (or basically non of the desired categories).

Upvotes: 0

Views: 149

Answers (2)

stefan
stefan

Reputation: 3759

no_fruit is just another class. what you need is Multiclass classification. SVM does separate classes via hyperplane, so you need another algorithm on top. most packages now supply such a multiclass classification, but there are differences in performance.

  1. they do each class against the group of the others
  2. they do each against each

whatever you do first you have multiple results (Rock-paper-scissors)

  1. in this case you may have 0 to n positives
  2. in this case you may have 1 to n classes with 1 to n-1 votes

i would suggest to use a library that does the voting as well.

although you speak of 'time series data'. that does not sound like fruits and might have other requirements

Upvotes: 1

Bee
Bee

Reputation: 2512

It depends on your SVM package. If you are using libsvm, you can have several "positive" classes. Just call the "invalid" class 0, apple as 1, orange as 2, and so on.

Upvotes: 1

Related Questions