如何在Mac上将LibSVM类添加到WEKA类路径 [英] How to add LibSVM class to WEKA classpath on a Mac

查看:181
本文介绍了如何在Mac上将LibSVM类添加到WEKA类路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在运行Max OS X 10.7 Lion,我想从命令行使用WEKA和LibSVM。我收到此错误:

 评估分类器的问题:libsvm类不在CLASSPATH中! 



我找到了LibSVM库

  • 转到Mac上的/ Applications文件夹(安装Weka应用程序的文件夹)

  • 右键单击Weka>选择显示包内容

  • 将libsvm.jar复制到/Applications/Weka.app/Contents/Resources/Java

  • 在您喜欢的文本编辑器中打开/Applications/Weka.app/Contents/Info.plist

  • < string> $ JAVAROOT / weka.jar< / string> 更改为< string> $ JAVAROOT / weka.jar:$ JAVAROOT / libsvm.jar< / string> (你也可以在这里调整堆大小)

  • 保存并启动weka


  • I am running Max OS X 10.7 Lion and I want to use WEKA with LibSVM from command line. I get this error:

    Problem evaluating classifier: libsvm classes not in CLASSPATH!
    

    I found the LibSVM library here. I need to add it to my Java classpath so that WEKA can find it. The download contains several files, shown below. I don't know how to add them to my classpath for Java.

    I am attempting to use the LibSVM classifier in WEKA because it is preferable for me over SMO. I am also unsure if this means the Java classpath or if it is specific to WEKA. I also don't know where to get these classes from. Any help is appreciated.

    解决方案

    Here is another extremely easy way to add LibSVM support to WEKA on OS X (no command line needed):

    1. Download LibSVM from here
    2. Go to /Applications folder on your Mac (the folder where the Weka app is installed)
    3. Right click on Weka > Chose "Show Package Contents"
    4. Copy libsvm.jar to /Applications/Weka.app/Contents/Resources/Java
    5. open /Applications/Weka.app/Contents/Info.plist in your favorite text editor
    6. change <string>$JAVAROOT/weka.jar</string> to <string>$JAVAROOT/weka.jar:$JAVAROOT/libsvm.jar</string> (you can also adjust the heap size here)
    7. Save and start weka

    这篇关于如何在Mac上将LibSVM类添加到WEKA类路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆