Click here to Skip to main content
16,013,489 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am using LIBSVM in java and I need to calculate the AUC values. The read me file says we can use the -v option splits the data into n parts and calculates cross validation accuracy/mean squared error on them, but in java I am using the svm_train function which does not have a -v option (it has SVM Problem and SVM Parameters as inputs). So I am using the cross_validation function as below but it does not return the accuracy (returns the labels) in the target array.

Java
svm.svm_cross_validation(SVM_Prob, SVM_Param, 3, target);

I get results like below which does not show any accuracy-

optimization finished, #iter = 21
nu = 0.06666666666666667
obj = -21.0, rho = 0.0
nSV = 42, nBSV = 0
Total nSV = 42
My data is not unbalanced so I am not sure if I should use LibLINEAR. can anyone tell me how to find the cross validation accuracy of libsvm in java.

Thanks!
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900