I am using a KNIME (2.11.3) runtime version for developing new nodes and ran into a problem when using the Weka LibSVM (3.7) node for training a one-class SVM. Since I could reproduce this error with my normal KNIME installation (2.11.0) I decided to post this issue here.
After configuring the node I got the following error-message in the KNIME Console:
ERROR WekaSerializer Unexpected error while loading settings from class: weka.classifiers.functions.LibSVM, using default values
Although I changed the SVM to be used to "one-class SVM (classification)" and the set the gamma value to be 0.0156.
When running the node it fails with the following error message:
ERROR 7) Execute failed: Weka classifier can not work with given data. Reason: weka.classifiers.functions.LibSVM: Cannot handle unary class!
The same setup works fine, when using Weka 3.6 in an older installation of KNIME (2.11.0).
My guess is, that this issue is related to the other Weka 3.7 problems I read about in this forum, that the nodes ignore their settings.
If you still experience problems when training a one-class svm with the weka LibSVM(3.7) Learner this is likely due to outdated domain information in your training table.
More precisely, if you get the error message "Cannot handle multi-valued nominal class!", try to apply a Domain Calculator node before the learner because the learner checks the domain information of the class column and if there is more than one possible value registered it fails. This can happen if you initially have data containing more than one class and split it into training and testing sets, such that the training set contains only one class. To check if this the case, you can open the table view, select the "Spec - Columns" tab and scroll to the right. There are the possible values for nominal columns listed. The Domain Calculator will recalculate the domains of your table and will thus correct the number of possible values to only be one.