Using Weka and Libsvm with C# in Visual Studio

0. Environment

Windows 8 Enterprice English X64

Visual Studio 2012 Ultimate

Weka 3.6.8 (weka-3-6-8.exe, http://www.cs.waikato.ac.nz/~ml/weka/)

wlsvm (wlsvm.zip, http://www.cs.iastate.edu/~yasser/wlsvm/)

ikvm 7.2.4630.5 (ikvmbin-7.2.4630.5.zip, http://www.ikvm.net/)

JDK 1.6.0_37 x86

1. Steps

1.0. I have JDK and Visual Studio installed

1.1. Install Weka by double click the file

1.2. Unzip wlsvm.zip, you get two files: libsvm.jar and wlsvm.jar. Move them to weka's root folder where you can find weka.jar.

1.3. Unzip ikvm, it's a green version. And add the bin folder to "Environment Variables" PATH.

1.4. In cmd, enter weka's root and run the command:

ikvmc -target:library weka.jar libsvm.jar wlsvm.jar

You can get a dll file, weka.dll

1.5. In Visual Studio, add weka.dll, IKVM.OpenJDK.*.dll and IKVM.Runtime.dll files into the "References"

1.6. Have fun!

2. References

http://weka.wikispaces.com/IKVM+with+Weka+tutorial

(This article is from http://www.cnblogs.com/chenyineng/archive/2012/12/11/2813689.html)

posted @ 2012-12-11 21:28  Yineng  阅读(1304)  评论(0编辑  收藏  举报
Homepage: www.chenyineng.info
Copyright 2010 - 2014 Yineng Chen. All rights reserved.