Generally, we encounter two problems when using WEKA for data mining. One is that the memory is insufficient, and the other is that libsvm cannot be used. In this case, we need to reconfigure the runweka. ini file to solve the above problems. View the original runweka. ini file as follows:
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%
The maxheap option sets WEKA's maximum memory usage. The default value is 1024 MB;
The CP option is the path of the imported package. The instructions in the comments show how to add the libsvm package;
Other options such as mainclass, fileencoding, and javaopts are graphic user interfaces, file encoding, and Java Virtual Machine options.