本文整理汇总了Java中weka.attributeSelection.Ranker.setThreshold方法的典型用法代码示例。如果您正苦于以下问题:Java Ranker.setThreshold方法的具体用法?Java Ranker.setThreshold怎么用?Java Ranker.setThreshold使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类weka.attributeSelection.Ranker
的用法示例。
在下文中一共展示了Ranker.setThreshold方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: InfoGainAttributeEval
import weka.attributeSelection.Ranker; //导入方法依赖的package包/类
public static AttributeSelection InfoGainAttributeEval(Instances data) throws Exception{
AttributeSelection filter = new AttributeSelection();
InfoGainAttributeEval evaluator = new InfoGainAttributeEval();
filter.setEvaluator(evaluator);
Ranker search = new Ranker();
search.setThreshold(0);
filter.setSearch(search);
filter.setInputFormat(data);
return filter;
}
示例2: InformationGain
import weka.attributeSelection.Ranker; //导入方法依赖的package包/类
public InformationGain(Instances dataset) throws Exception{
data = dataset;
infoG = new InfoGainAttributeEval();
infoG.buildEvaluator(data);
filter = new AttributeSelection();
search = new Ranker();
search.setThreshold(0.0);
}