Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

java classpath error using LibSVM programmatically within Weka

I'm trying to use LibSVM programmatically in Java, via the Weka wrapper written by El-Manzalawy, running on Windows 7. I've added C:\Program Files (x86)\libsvm-3.12\java\libsvm.jar to my CLASSPATH environmental variable. After adding that I can now use LibSVM via the Weka explorer user interface, but it still fails when I'm calling it in code (debugging in eclipse).

I try to create it using Weka.core.Utils.forName. This goes through to LibSVM.java which then calls the java method Class.forName(...), passing CLASS_SVM as the param which is set to "libsvm.svm".

I've used Weka.core.Utils.forName to create others classifiers programmatically without problems.

Anyone have any ideas?

like image 631
Philip Welch Avatar asked May 31 '26 00:05

Philip Welch


1 Answers

You should be able to glue libsvm and weka in your java program using the answer posted here: How to use LibSVM with Weka in my Java code?

like image 186
andrew Avatar answered Jun 01 '26 14:06

andrew



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!