Exception in thread "main" java.lang.IllegalArgumentException: The arff data fil

huzongjie123456 2015-10-27 01:36:22
我的程序是这个
package testmulan10;
import mulan.classifier.lazy.MLkNN;
import mulan.classifier.meta.RAkEL;
import mulan.classifier.transformation.LabelPowerset;
import mulan.data.MultiLabelInstances;
import mulan.evaluation.Evaluator;
import mulan.evaluation.MultipleEvaluation;
import weka.classifiers.trees.J48;
import weka.core.Utils;
public class testmulan10 {
public static void main(String[] args) throws Exception {
String arffFilename = Utils.getOption("arff", args); // e.g. -arff emotions.arff
String xmlFilename = Utils.getOption("xml",args); // e.g. -xml emotions.xml

MultiLabelInstances dataset = new MultiLabelInstances(arffFilename, xmlFilename);

RAkEL learner1 = new RAkEL(new LabelPowerset(new J48()));
MLkNN learner2 = new MLkNN();
Evaluator eval = new Evaluator();
MultipleEvaluation results;

int numFolds = 10;
results = eval.crossValidate(learner1, dataset, numFolds);
System.out.println(results);
results = eval.crossValidate(learner2, dataset, numFolds);
System.out.println(results);
}

}
在运行的时候报错
Exception in thread "main" java.lang.IllegalArgumentException: The arff data file does not exists under specified path 'D:\JAVA\testmulan10'.
at mulan.data.MultiLabelInstances.loadInstances(MultiLabelInstances.java:538)
at mulan.data.MultiLabelInstances.<init>(MultiLabelInstances.java:201)
at testmulan10.testmulan10.main(testmulan10.java:15)
但是arff data数据我加载了,为什么会出现这种情况,求大神指导!
...全文
667 点赞 收藏 1
写回复
1 条回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复
密码测试 2015-11-24
你确定D:\JAVA\testmulan10下面有?
回复
相关推荐
发帖
J2ME
创建于2007-09-28

1.3w+

社区成员

Java J2ME
申请成为版主
帖子事件
创建了帖子
2015-10-27 01:36
社区公告
暂无公告