I cannot criticize your whole approach, but one important element that you are missing is telling SVM that you want to regress. (Unlike many people's impressions, LibSVM can do regression, see http://www.csie.ntu.edu.tw/~cjlin/libsvm/ - "LIBSVM is & hellip; for & hellip; regression (epsilon-SVR, nu-SVR) & hellip; ")
You need to do this in order to say in order to regression:
svm.setSVMType(new SelectedTag(LibSVM.SVMTYPE_EPSILON_SVR, LibSVM.TAGS_SVMTYPE));
/ rob
PS - I still got the error "Can't handle the number class" until I encoded all the parameters using the Java object-oriented approach using the LibSVM object methods, instead of using the String-based "Parameters" approach. I do not know why this is so, and may be a red herring, but it is.
source share