首页 > 代码库 > WEKA运行参数修改(RunWeka.ini文件)
WEKA运行参数修改(RunWeka.ini文件)
一般使用weka进行数据挖掘的时候会碰到两个问题,一是内存不够,二是libsvm使用不了,这时就需要重新配置RunWeka.ini文件,解决上述问题。查看RunWeka.ini原文如下:
1 # Contains the commands for running Weka either with a command prompt 2 # ("cmd_console") or without the command prompt ("cmd_default"). 3 # One can also define custom commands, which can be used with the Weka 4 # launcher "RunWeka.class". E.g., to run the launcher with a setup called 5 # "custom1", you only need to specify a key "cmd_custom1" which contains the 6 # command specification. 7 # 8 # Notes: 9 # - This file is not a DOS ini file, but a Java properties file.10 # - The settings listed here are key-value pairs, separated by a "=". Every11 # key can only be listed ONCE.12 #13 # Author FracPete (fracpete at waikato dot ac dot nz)14 # Version $Revision: 1.3 $15 16 # setups (prefixed with "cmd_")17 cmd_default=javaw -Dfile.encoding=#fileEncoding# -Xmx#maxheap# #javaOpts# -classpath "#wekajar#;#cp#" #mainclass#18 cmd_console=cmd.exe /K start cmd.exe /K "java -Dfile.encoding=#fileEncoding# -Xmx#maxheap# #javaOpts# -classpath \"#wekajar#;#cp#\" #mainclass#"19 cmd_explorer=java -Dfile.encoding=#fileEncoding# -Xmx#maxheap# #javaOpts# -classpath "#wekajar#;#cp#" weka.gui.explorer.Explorer20 cmd_knowledgeFlow=java -Dfile.encoding=#fileEncoding# -Xmx#maxheap# #javaOpts# -classpath "#wekajar#;#cp#" weka.gui.beans.KnowledgeFlow21 22 # placeholders ("#bla#" in command gets replaced with content of key "bla")23 # Note: "#wekajar#" gets replaced by the launcher class, since that jar gets24 # provided as parameter25 maxheap=1024M26 # The MDI GUI27 #mainclass=weka.gui.Main28 # The GUIChooser29 mainclass=weka.gui.GUIChooser30 # The file encoding; use "utf-8" instead of "Cp1252" to display UTF-8 characters in the 31 # GUI, e.g., the Explorer32 fileEncoding=Cp125233 # The JAVA_OPTS environment variable (if set). Can be used as an alternative way to set34 # the heap size (or any other JVM option)35 javaOpts=%JAVA_OPTS%36 # The classpath placeholder. Add any environment variables or jars to it that37 # you need for your Weka environment.38 # Example with an enviroment variable (e.g., THIRD_PARTY_LIBS):39 # cp=%CLASSPATH%;%THIRD_PARTY_LIBS%40 # Example with an extra jar (located at D:\libraries\libsvm.jar):41 # cp=%CLASSPATH%;D:\\\\libraries\\\\libsvm.jar42 # Or in order to avoid quadrupled backslashes, you can also use slashes "/":43 # cp=%CLASSPATH%;D:/libraries/libsvm.jar44 cp=%CLASSPATH%
其中maxheap选项为配置weka最大使用内存,默认为1024M;
cp选项为引入包所在路径,从注释中的说明可以看到libsvm包的添加方法;
其他如:mainclass,fileEncoding,javaOpts分别为图形用户界面,文件编码,Java虚拟机选项。
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。