I am working on LibSVM classifier and Weka in java and I want to get the support vector which results from the training.
So, can anybody tell me how to get the support vector using java code?
This is a snapshot of my code:
LibSVM classifier = new LibSVM();
Instances instsTrain = new Instances(new FileReader("Train.arff"));
instsTrain.setClassIndex(instsTrain.numAttributes() - 1);
classifier.buildClassifier(instsTrain);
the result of that code was
optimization finished, #iter = 34
nu = 0.9733207501211705
obj = -47.33334391005496, rho = 0.33325162948067544
nSV = 50, nBSV = 46
Total nSV = 137
And nSV is the number of the Support Vector, but i cant get the data of the Support Vector.
Thanks for your help.