SANN3
SANN3

Reputation: 10069

How to achieve Multiclass classification in weka SMO classifier?

I am using weka for classification. In weka i am using SMO to classify the documents.In some situation SMO return wrong category.

For example take 2 category Computer and Cricket.First i trained and created model for these 2 category.Then i am going to test a document which contents are related to both category in 50:50 ratio. The SMO returns only the first category computer. If 50:50 ratio means i need to return both category.

How to achieve Multiclass classification in SMO classifier ?

Upvotes: 0

Views: 4389

Answers (2)

user1669710
user1669710

Reputation: 234

I know people may use different terminologies, but the most commonly accepted term for your problem is "Multilabel classification" (https://en.wikipedia.org/wiki/Multi-label_classification).

I think the wikipedia article mentioning multiclass classification is incorrectly written, or it is the terminology from a different domain that uses similar methods.

Multiclass classification usually means classifying a data point into only one of the many (>2) classes possible, as opposed to multilabel classification which means classifying a data point into more than 1 of the possible classes.

You can look at Meka - an extension of Weka with some multilabel classifiers implemented. I know you want to use weka, but if not, you could try multilabel libsvm.

Upvotes: 0

Atilla Ozgur
Atilla Ozgur

Reputation: 14721

Normally a classifier gives one result. From what I understand your question, you need distributionForInstance. This method will give you probability for classes. In your example your should get 1/2 and 1/2 for probabilities.

You mention

Yes from that method only i am getting wrong probability . For computer class i am getting 0.63 and for 0.36 for cricket. But content and number of words is equal for both categories

problem with your interpretation is that you expect class probabilities to come from only content and number of words. This is true for example for Naive Bayes but not in general for other classifiers. If you try same classification with naive bayes, you may see your expected probabilities.

Your class probabilities are given according to support vectors in SVM. This means that your 0.63 probability class is more probable according to support vectors.

Upvotes: 1

Related Questions