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

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

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

J48.measureNumLeaves介绍

[英]Returns the number of leaves
[中]返回叶数

代码示例

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

/**
 * Returns the value of the named measure
 * 
 * @param additionalMeasureName the name of the measure to query for its value
 * @return the value of the named measure
 * @throws IllegalArgumentException if the named measure is not supported
 */
@Override
public double getMeasure(String additionalMeasureName) {
 if (additionalMeasureName.compareToIgnoreCase("measureNumRules") == 0) {
  return measureNumRules();
 } else if (additionalMeasureName.compareToIgnoreCase("measureTreeSize") == 0) {
  return measureTreeSize();
 } else if (additionalMeasureName.compareToIgnoreCase("measureNumLeaves") == 0) {
  return measureNumLeaves();
 } else {
  throw new IllegalArgumentException(additionalMeasureName
   + " not supported (j48)");
 }
}

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

/**
 * Returns the value of the named measure
 * 
 * @param additionalMeasureName the name of the measure to query for its value
 * @return the value of the named measure
 * @throws IllegalArgumentException if the named measure is not supported
 */
@Override
public double getMeasure(String additionalMeasureName) {
 if (additionalMeasureName.compareToIgnoreCase("measureNumRules") == 0) {
  return measureNumRules();
 } else if (additionalMeasureName.compareToIgnoreCase("measureTreeSize") == 0) {
  return measureTreeSize();
 } else if (additionalMeasureName.compareToIgnoreCase("measureNumLeaves") == 0) {
  return measureNumLeaves();
 } else {
  throw new IllegalArgumentException(additionalMeasureName
   + " not supported (j48)");
 }
}

相关文章