I try to classify some instances of a test dataset by using Weka's OneClassClassifier class.
I trained the classifier by using a distinct training dataset. Both the test and training set (arff files) have the same structure of attributes but the test set doesn't contain any class values.
The used classifier options are -tcl myclass (to set my target class).
Running the distributionForInstance(Instance) method, I got the following Error:
java.lang.ArrayIndexOutOfBoundsException: 3
# weka.core.DenseInstance.value(weka/core/DenseInstance.java:332)
# weka.core.AbstractInstance.isMissing(weka/core/AbstractInstance.java:315)
# weka.filters.unsupervised.attribute.AddValues.input(weka/filters/
unsupervised/attribute/AddValues.java:315)
# weka.classifiers.meta.OneClassClassifier.distributionForInstance(weka/
classifiers/meta/OneClassClassifier.java:1380)
Using other classifiers (e.g. trees.RandomForest, functions.Logistic) my routines are running successfully. What am I doing wrong?