Weka > libsvm> One Class SVM > Error while creating model with training set

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Weka > libsvm> One Class SVM > Error while creating model with training set

Shannon Mascarenhas
Reference Link - http://list.waikato.ac.nz/pipermail/wekalist/2007-October/038023.html describes - Help weka, face recognition

I have weka 3-7-13 installed and am currently working on one class svm. I used the attached data from the reference thread(above) - iris data with class 'in_database'. When I try to run the classifier - libsvm > one class svm > weka.classifiers.functions.LibSVM -S 2 -K 2 -D 3 -G 0.2 -R 0.0 -N 0.5 -M 40.0 -C 1.0 -E 0.0010 -P 0.1
I get the following error -
Problem evaluating classifier- All class values are the same. 
Atleast two class value should be different
.

java.lang.Exception: All class values are the same. At least two class values should be different
weka.classifiers.functions.LibSVM.buildClassifier(LibSVM.java:1659)
weka.gui.explorer.ClassifierPanel$18.run(ClassifierPanel.java:1399)

at weka.classifiers.functions.LibSVM.buildClassifier(LibSVM.java:1659)
at weka.gui.explorer.ClassifierPanel$18.run(ClassifierPanel.java:1399)

I am working on a dataset that is very similar to this iris dataset. As per my understanding, training set should have one class and we test other datasets with it. Just to try, I added two values for class in the training set, and it gives me the following error:-
weka.core.UnsupportedAttributeTypeException: weka.classifiers.functions.LibSVM: Cannot handle binary class!
    weka.core.Capabilities.test(Capabilities.java:1118)
    weka.core.Capabilities.test(Capabilities.java:1303)
    weka.core.Capabilities.test(Capabilities.java:1208)
    weka.core.Capabilities.testWithFail(Capabilities.java:1506)
    weka.classifiers.functions.LibSVM.buildClassifier(LibSVM.java:1649)
    weka.gui.explorer.ClassifierPanel$18.run(ClassifierPanel.java:1399)

    at weka.core.Capabilities.test(Capabilities.java:1118)
    at weka.core.Capabilities.test(Capabilities.java:1303)
    at weka.core.Capabilities.test(Capabilities.java:1208)
    at weka.core.Capabilities.testWithFail(Capabilities.java:1506)
    at weka.classifiers.functions.LibSVM.buildClassifier(LibSVM.java:1649)
    at weka.gui.explorer.ClassifierPanel$18.run(ClassifierPanel.java:1399)


​Please could someone help me? I wish to successfully create a model with training set- using one class SVM​. Is there something that I am missing?

Any help will be highly appreciated. Thanks

_______________________________________________
Wekalist mailing list
Send posts to: [hidden email]
List info and subscription status: http://list.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Weka > libsvm> One Class SVM > Error while creating model with training set

Eibe Frank-2
Administrator
This seems to be a bug I introduced in version 1.0.7 of the LibSVM package. You can downgrade to 1.0.6 and it will work.

To downgrade, install the old version of the package by entering the following URL via the "File/URL" button in the "Unofficial" sub panel of the WEKA package manager GUI (top-right corner):

  http://prdownloads.sourceforge.net/weka/LibSVM1.0.6.zip?download

Cheers,
Eibe

> On 24 Mar 2016, at 10:30, Shannon Mascarenhas <[hidden email]> wrote:
>
> Reference Link - http://list.waikato.ac.nz/pipermail/wekalist/2007-October/038023.html describes - Help weka, face recognition
>
> I have weka 3-7-13 installed and am currently working on one class svm. I used the attached data from the reference thread(above) - iris data with class 'in_database'. When I try to run the classifier - libsvm > one class svm > weka.classifiers.functions.LibSVM -S 2 -K 2 -D 3 -G 0.2 -R 0.0 -N 0.5 -M 40.0 -C 1.0 -E 0.0010 -P 0.1
> I get the following error -
> Problem evaluating classifier- All class values are the same.
> Atleast two class value should be different.
>
> java.lang.Exception: All class values are the same. At least two class values should be different
> weka.classifiers.functions.LibSVM.buildClassifier(LibSVM.java:1659)
> weka.gui.explorer.ClassifierPanel$18.run(ClassifierPanel.java:1399)
>
> at weka.classifiers.functions.LibSVM.buildClassifier(LibSVM.java:1659)
> at weka.gui.explorer.ClassifierPanel$18.run(ClassifierPanel.java:1399)
>
> I am working on a dataset that is very similar to this iris dataset. As per my understanding, training set should have one class and we test other datasets with it. Just to try, I added two values for class in the training set, and it gives me the following error:-
> weka.core.UnsupportedAttributeTypeException: weka.classifiers.functions.LibSVM: Cannot handle binary class!
>     weka.core.Capabilities.test(Capabilities.java:1118)
>     weka.core.Capabilities.test(Capabilities.java:1303)
>     weka.core.Capabilities.test(Capabilities.java:1208)
>     weka.core.Capabilities.testWithFail(Capabilities.java:1506)
>     weka.classifiers.functions.LibSVM.buildClassifier(LibSVM.java:1649)
>     weka.gui.explorer.ClassifierPanel$18.run(ClassifierPanel.java:1399)
>
>     at weka.core.Capabilities.test(Capabilities.java:1118)
>     at weka.core.Capabilities.test(Capabilities.java:1303)
>     at weka.core.Capabilities.test(Capabilities.java:1208)
>     at weka.core.Capabilities.testWithFail(Capabilities.java:1506)
>     at weka.classifiers.functions.LibSVM.buildClassifier(LibSVM.java:1649)
>     at weka.gui.explorer.ClassifierPanel$18.run(ClassifierPanel.java:1399)
>
>
> ​Please could someone help me? I wish to successfully create a model with training set- using one class SVM​. Is there something that I am missing?
>
> Any help will be highly appreciated. Thanks
> _______________________________________________
> Wekalist mailing list
> Send posts to: [hidden email]
> List info and subscription status: http://list.waikato.ac.nz/mailman/listinfo/wekalist
> List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html

_______________________________________________
Wekalist mailing list
Send posts to: [hidden email]
List info and subscription status: http://list.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Weka > libsvm> One Class SVM > Error while creating model with training set

Eibe Frank-2
Administrator
In reply to this post by Shannon Mascarenhas
We have made a new release of the LibSVM package where this bug has been fixed (version number 1.0.8).

Cheers,
Eibe

> On 24 Mar 2016, at 10:30, Shannon Mascarenhas <[hidden email]> wrote:
>
> Reference Link - http://list.waikato.ac.nz/pipermail/wekalist/2007-October/038023.html describes - Help weka, face recognition
>
> I have weka 3-7-13 installed and am currently working on one class svm. I used the attached data from the reference thread(above) - iris data with class 'in_database'. When I try to run the classifier - libsvm > one class svm > weka.classifiers.functions.LibSVM -S 2 -K 2 -D 3 -G 0.2 -R 0.0 -N 0.5 -M 40.0 -C 1.0 -E 0.0010 -P 0.1
> I get the following error -
> Problem evaluating classifier- All class values are the same.
> Atleast two class value should be different.
>
> java.lang.Exception: All class values are the same. At least two class values should be different
> weka.classifiers.functions.LibSVM.buildClassifier(LibSVM.java:1659)
> weka.gui.explorer.ClassifierPanel$18.run(ClassifierPanel.java:1399)
>
> at weka.classifiers.functions.LibSVM.buildClassifier(LibSVM.java:1659)
> at weka.gui.explorer.ClassifierPanel$18.run(ClassifierPanel.java:1399)
>
> I am working on a dataset that is very similar to this iris dataset. As per my understanding, training set should have one class and we test other datasets with it. Just to try, I added two values for class in the training set, and it gives me the following error:-
> weka.core.UnsupportedAttributeTypeException: weka.classifiers.functions.LibSVM: Cannot handle binary class!
>     weka.core.Capabilities.test(Capabilities.java:1118)
>     weka.core.Capabilities.test(Capabilities.java:1303)
>     weka.core.Capabilities.test(Capabilities.java:1208)
>     weka.core.Capabilities.testWithFail(Capabilities.java:1506)
>     weka.classifiers.functions.LibSVM.buildClassifier(LibSVM.java:1649)
>     weka.gui.explorer.ClassifierPanel$18.run(ClassifierPanel.java:1399)
>
>     at weka.core.Capabilities.test(Capabilities.java:1118)
>     at weka.core.Capabilities.test(Capabilities.java:1303)
>     at weka.core.Capabilities.test(Capabilities.java:1208)
>     at weka.core.Capabilities.testWithFail(Capabilities.java:1506)
>     at weka.classifiers.functions.LibSVM.buildClassifier(LibSVM.java:1649)
>     at weka.gui.explorer.ClassifierPanel$18.run(ClassifierPanel.java:1399)
>
>
> ​Please could someone help me? I wish to successfully create a model with training set- using one class SVM​. Is there something that I am missing?
>
> Any help will be highly appreciated. Thanks
> _______________________________________________
> Wekalist mailing list
> Send posts to: [hidden email]
> List info and subscription status: http://list.waikato.ac.nz/mailman/listinfo/wekalist
> List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html

_______________________________________________
Wekalist mailing list
Send posts to: [hidden email]
List info and subscription status: http://list.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Weka > libsvm> One Class SVM > Error while creating model with training set

pikunimohanty@gmail.com
This post has NOT been accepted by the mailing list yet.
Hi
I am using LibSVM 1.0.8. But still getting this error.

I am using for regression problem.
Loading...