Yumi
Yumi

Reputation: 25

One-Class SVM using Rapidminer

I am trying on the one-class libsvm on rapidminer. However, I received a problem states that "binominal label not supported". My label dataset has one type of label only. If I change the svm type to "C-SVC", it will pop a problem saying "SVM does not have sufficient capabilities for handling an example set with only one label". I've tried several data type and I saw this thread http://rapid-i.com/rapidforum/index.php/topic,1596.0.html but it does not help much in my case. I checked out the svm operator information. It shows that the operator only accept one class label. But, the set role operator only have a general label. It can't set the role to one-class.

I am quite new in using rapidminer.

Please help :((

Thank you.

Upvotes: 0

Views: 618

Answers (1)

hooge
hooge

Reputation: 25

I ran into this problem a while back. If anyone else encounters this, here is what worked for me:

Even though you only have one label in the training set, there are probably (at least) 2 possible values that your examples could have. After filtering the training set to only contain positive examples, you have to add a map component in which you set all possible values of your label to the single label you are training the model for.

NOTE: Afterwards, you will have to map the values back. Map inside to the label you have trained the model for and outside for negative examples.

example

For my workflow, within a X-Validation I first filtered my training set to only contain examples with 'Male' attributes. Then, we map 'Male' to 'Male' and 'Female' to 'Male' (this doesn't change any examples, but Rapidminer will now allow us to use LibSVM's One Class SVM). We then train the model. During testing, we apply the model on the unfiltered test set. This gives us predictions of inside or outside. We then map inside to 'Male' and outside to 'Female' and perform a Performance Classification on the prediction.

enter image description here

Upvotes: 1

Related Questions