-
大小: 77KB文件类型: .zip金币: 1下载: 0 次发布日期: 2021-05-22
- 语言: Java
- 标签: libsvm.jar wlsvm.jar
资源简介
libsvm.jar and wlsvm.jar let you can use it in weka. You can download them and use them.
代码片段和文件信息
/*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not write to the Free Software
* Foundation Inc. 675 Mass Ave Cambridge MA 02139 USA.
*/
/*
* Example.java
* Copyright (C) 2005 Yasser EL-Manzalawy
*
*/
/*
* This exmaple deomnstrates how to use WLSVM classifier.
*/
import weka.classifiers.Evaluation;
import wlsvm.WLSVM;
public class Example {
public static void main(String[] argv)throws Exception{
if (argv.length < 1){
System.out.println(“Usage: Example “);
System.exit(1);
}
String dataFile = argv[0]; // input arff file
WLSVM lib = new WLSVM();
String[] ops = {new String(“-t“)
dataFile
new String(“-x“) // 5 folds CV
new String(“5“)
new String(“-i“) //
//---------------
new String(“-S“) // WLSVM options
new String(“0“) // Classification problem
new String(“-K“) // RBF kernel
new String(“2“)
new String(“-G“) // gamma
new String(“1“)
new String(“-C“) // C
new String(“7“)
new String(“-Z“) // normalize input data
new String(“1“)
new String(“-M“) // cache size in MB
new String(“100“)
};
System.out.println(Evaluation.evaluateModel(libops));
}
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2005-10-12 12:44 WLSVM\
文件 976 2005-10-06 17:11 WLSVM\COPYRIGHT
目录 0 2005-10-06 17:13 WLSVM\Examples\
文件 1912 2005-10-11 16:35 WLSVM\Examples\Example.java
目录 0 2005-10-11 16:34 WLSVM\lib\
文件 116434 2005-10-11 15:56 WLSVM\lib\libsvm.jar
文件 15409 2005-11-08 23:29 WLSVM\lib\wlsvm.jar
文件 17977 2003-03-14 08:35 WLSVM\LICENSE
文件 2756 2005-10-22 15:30 WLSVM\README
文件 1496 2005-06-14 10:05 WLSVM\README.libsvm
文件 14174 2004-10-02 04:18 WLSVM\README.weka
目录 0 2005-10-12 12:44 WLSVM\src\
目录 0 2005-10-12 12:44 WLSVM\src\wlsvm\
文件 15085 2005-11-08 23:26 WLSVM\src\wlsvm\WLSVM.class
文件 20042 2005-11-08 23:26 WLSVM\src\wlsvm\WLSVM.java
- 上一篇:java开发汽车租赁系统
- 下一篇:android五子棋大作业
评论
共有 条评论