weka.classifiers.trees.J48.buildClassifier()方法的使用及代码示例

x33g5p2x  于2022-01-22 转载在 其他  
字(1.3k)|赞(0)|评价(0)|浏览(137)

本文整理了Java中weka.classifiers.trees.J48.buildClassifier()方法的一些代码示例,展示了J48.buildClassifier()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。J48.buildClassifier()方法的具体详情如下:
包路径:weka.classifiers.trees.J48
类名称:J48
方法名:buildClassifier

J48.buildClassifier介绍

[英]Generates the classifier.
[中]生成分类器。

代码示例

代码示例来源:origin: nz.ac.waikato.cms.weka/weka-stable

/**
 * Builds the classifier to generate a partition.
 */
@Override
public void generatePartition(Instances data) throws Exception {
 buildClassifier(data);
}

代码示例来源:origin: Waikato/weka-trunk

/**
 * Builds the classifier to generate a partition.
 */
@Override
public void generatePartition(Instances data) throws Exception {
 buildClassifier(data);
}

代码示例来源:origin: stackoverflow.com

J48 j48 = new J48();
j48.buildClassifier(train);
weka.core.SerializationHelper.write("/some/where/j48.model", j48);

代码示例来源:origin: stackoverflow.com

//Learning
DataSource source = new DataSource(Path);
Instances data = source.getDataSet();
J48 tree = tree.buildClassifier(data);

//Evaluation
Evaluation eval = new Evaluation(data);
eval.evaluateModel(tree, data);
System.out.println((eval.correct()/data.numInstances())*100);

代码示例来源:origin: stackoverflow.com

tree.buildClassifier(dataset);

代码示例来源:origin: stackoverflow.com

j48.buildClassifier(train);
System.out.print(j48.graph());

相关文章