亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? j48.java

?? weka 源代碼很好的 對于學習 數據挖掘算法很有幫助
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
/* *    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. *//* *    J48.java *    Copyright (C) 1999 Eibe Frank * */package weka.classifiers.j48;import java.util.*;import weka.core.*;import weka.classifiers.*;/** * Class for generating an unpruned or a pruned C4.5 decision tree. * For more information, see<p> * * Ross Quinlan (1993). <i>C4.5: Programs for Machine Learning</i>,  * Morgan Kaufmann Publishers, San Mateo, CA. </p> * * Valid options are: <p> * * -U <br> * Use unpruned tree.<p> * * -C confidence <br> * Set confidence threshold for pruning. (Default: 0.25) <p> * * -M number <br> * Set minimum number of instances per leaf. (Default: 2) <p> * * -R <br> * Use reduced error pruning. No subtree raising is performed. <p> * * -N number <br> * Set number of folds for reduced error pruning. One fold is * used as the pruning set. (Default: 3) <p> * * -B <br> * Use binary splits for nominal attributes. <p> * * -S <br> * Don't perform subtree raising. <p> * * -L <br> * Do not clean up after the tree has been built. <p> * * -A <br> * If set, Laplace smoothing is used for predicted probabilites. <p> * * * @author Eibe Frank (eibe@cs.waikato.ac.nz) * @version $Revision: 1.22 $ */public class J48 extends DistributionClassifier implements OptionHandler,   Drawable, Matchable, Sourcable, WeightedInstancesHandler, Summarizable,  AdditionalMeasureProducer {  // To maintain the same version number after adding m_ClassAttribute  static final long serialVersionUID = -217733168393644444L;  /** The decision tree */  private ClassifierTree m_root;    /** Unpruned tree? */  private boolean m_unpruned = false;  /** Confidence level */  private float m_CF = 0.25f;  /** Minimum number of instances */  private int m_minNumObj = 2;  /** Determines whether probabilities are smoothed using      Laplace correction when predictions are generated */  private boolean m_useLaplace = false;  /** Use reduced error pruning? */  private boolean m_reducedErrorPruning = false;  /** Number of folds for reduced error pruning. */  private int m_numFolds = 3;  /** Binary splits on nominal attributes? */  private boolean m_binarySplits = false;  /** Subtree raising to be performed? */  private boolean m_subtreeRaising = true;  /** Cleanup after the tree has been built. */  boolean m_noCleanup = false;    /**   * Generates the classifier.   *   * @exception Exception if classifier can't be built successfully   */  public void buildClassifier(Instances instances)        throws Exception{    ModelSelection modSelection;	     if (m_binarySplits)      modSelection = new BinC45ModelSelection(m_minNumObj, instances);    else      modSelection = new C45ModelSelection(m_minNumObj, instances);    if (!m_reducedErrorPruning)      m_root = new C45PruneableClassifierTree(modSelection, !m_unpruned, m_CF,					    m_subtreeRaising, !m_noCleanup);    else      m_root = new PruneableClassifierTree(modSelection, !m_unpruned, m_numFolds,					   !m_noCleanup);    m_root.buildClassifier(instances);    if (m_binarySplits) {      ((BinC45ModelSelection)modSelection).cleanup();    } else {      ((C45ModelSelection)modSelection).cleanup();    }  }  /**   * Classifies an instance.   *   * @exception Exception if instance can't be classified successfully   */  public double classifyInstance(Instance instance) throws Exception {    return m_root.classifyInstance(instance);  }  /**    * Returns class probabilities for an instance.   *   * @exception Exception if distribution can't be computed successfully   */  public final double [] distributionForInstance(Instance instance)        throws Exception {    return m_root.distributionForInstance(instance, m_useLaplace);  }  /**   * Returns graph describing the tree.   *   * @exception Exception if graph can't be computed   */  public String graph() throws Exception {    return m_root.graph();  }  /**   * Returns tree in prefix order.   *   * @exception Exception if something goes wrong   */  public String prefix() throws Exception {        return m_root.prefix();  }  /**   * Returns tree as an if-then statement.   *   * @return the tree as a Java if-then type statement   * @exception Exception if something goes wrong   */  public String toSource(String className) throws Exception {    StringBuffer [] source = m_root.toSource(className);    return     "class " + className + " {\n\n"    +"  public static double classify(Object [] i)\n"    +"    throws Exception {\n\n"    +"    double p = Double.NaN;\n"    + source[0]  // Assignment code    +"    return p;\n"    +"  }\n"    + source[1]  // Support code    +"}\n";  }  /**   * Returns an enumeration describing the available options   *   * Valid options are: <p>   *   * -U <br>   * Use unpruned tree.<p>   *   * -C confidence <br>   * Set confidence threshold for pruning. (Default: 0.25) <p>   *   * -M number <br>   * Set minimum number of instances per leaf. (Default: 2) <p>   *   * -R <br>   * Use reduced error pruning. No subtree raising is performed. <p>   *   * -N number <br>   * Set number of folds for reduced error pruning. One fold is   * used as the pruning set. (Default: 3) <p>   *   * -B <br>   * Use binary splits for nominal attributes. <p>   *   * -S <br>   * Don't perform subtree raising. <p>   *   * -L <br>   * Do not clean up after the tree has been built.   *   * -A <br>   * If set, Laplace smoothing is used for predicted probabilites. <p>   *   * @return an enumeration of all the available options   */  public Enumeration listOptions() {    Vector newVector = new Vector(9);    newVector.	addElement(new Option("\tUse unpruned tree.",			      "U", 0, "-U"));    newVector.	addElement(new Option("\tSet confidence threshold for pruning.\n" +			      "\t(default 0.25)",			      "C", 1, "-C <pruning confidence>"));    newVector.	addElement(new Option("\tSet minimum number of instances per leaf.\n" +			      "\t(default 2)",			      "M", 1, "-M <minimum number of instances>"));    newVector.	addElement(new Option("\tUse reduced error pruning.",			      "R", 0, "-R"));    newVector.	addElement(new Option("\tSet number of folds for reduced error\n" +			      "\tpruning. One fold is used as pruning set.\n" +			      "\t(default 3)",			      "N", 1, "-N <number of folds>"));    newVector.	addElement(new Option("\tUse binary splits only.",			      "B", 0, "-B"));    newVector.        addElement(new Option("\tDon't perform subtree raising.",			      "S", 0, "-S"));    newVector.        addElement(new Option("\tDo not clean up after the tree has been built.",			      "L", 0, "-L"));   newVector.        addElement(new Option("\tLaplace smoothing for predicted probabilities.",			      "A", 0, "-A"));    return newVector.elements();  }  /**   * Parses a given list of options.   *   * @param options the list of options as an array of strings   * @exception Exception if an option is not supported   */  public void setOptions(String[] options) throws Exception{        // Other options    String minNumString = Utils.getOption('M', options);    if (minNumString.length() != 0) {      m_minNumObj = Integer.parseInt(minNumString);    } else {      m_minNumObj = 2;    }    m_binarySplits = Utils.getFlag('B', options);    m_useLaplace = Utils.getFlag('A', options);    // Pruning options    m_unpruned = Utils.getFlag('U', options);    m_subtreeRaising = !Utils.getFlag('S', options);    m_noCleanup = Utils.getFlag('L', options);    if ((m_unpruned) && (!m_subtreeRaising)) {      throw new Exception("Subtree raising doesn't need to be unset for unpruned tree!");    }    m_reducedErrorPruning = Utils.getFlag('R', options);    if ((m_unpruned) && (m_reducedErrorPruning)) {      throw new Exception("Unpruned tree and reduced error pruning can't be selected " +			  "simultaneously!");    }    String confidenceString = Utils.getOption('C', options);    if (confidenceString.length() != 0) {      if (m_reducedErrorPruning) {	throw new Exception("Setting the confidence doesn't make sense " +			    "for reduced error pruning.");      } else if (m_unpruned) {	throw new Exception("Doesn't make sense to change confidence for unpruned "			    +"tree!");      } else {	m_CF = (new Float(confidenceString)).floatValue();	if ((m_CF <= 0) || (m_CF >= 1)) {	  throw new Exception("Confidence has to be greater than zero and smaller " +			      "than one!");	}      }    } else {      m_CF = 0.25f;    }    String numFoldsString = Utils.getOption('N', options);    if (numFoldsString.length() != 0) {      if (!m_reducedErrorPruning) {	throw new Exception("Setting the number of folds" +			    " doesn't make sense if" +			    " reduced error pruning is not selected.");      } else {	m_numFolds = Integer.parseInt(numFoldsString);      }    } else {      m_numFolds = 3;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产高清精品网站| 9人人澡人人爽人人精品| 成人在线视频一区| 欧美制服丝袜第一页| 国产日产欧美一区| 久久激情综合网| 欧美日韩激情一区二区| 成人欧美一区二区三区黑人麻豆| 秋霞午夜av一区二区三区| 色综合天天做天天爱| 国产婷婷色一区二区三区四区| 热久久免费视频| 9191久久久久久久久久久| 亚洲精品视频在线| 成年人午夜久久久| 久久综合av免费| 紧缚奴在线一区二区三区| 日韩一本二本av| 天天操天天综合网| 欧美日韩一二三区| 亚洲第一精品在线| 欧美性色欧美a在线播放| 一区二区三区在线播放| 色诱亚洲精品久久久久久| 最新国产成人在线观看| 成人一区二区三区在线观看| 久久精品夜色噜噜亚洲aⅴ| 精品在线观看视频| 337p粉嫩大胆色噜噜噜噜亚洲| 美女脱光内衣内裤视频久久影院| 91精品国模一区二区三区| 日本亚洲天堂网| 日韩精品一区二区三区视频| 九一九一国产精品| 欧美xxxxx牲另类人与| 亚洲成人在线观看视频| 3d动漫精品啪啪一区二区竹菊| 天天操天天干天天综合网| 欧美日韩免费一区二区三区| 午夜成人免费视频| 欧美成人一区二区三区片免费 | 国产老肥熟一区二区三区| 日韩欧美久久久| 极品少妇一区二区三区精品视频 | 国产精品99久久久久| 久久这里只有精品首页| 成人天堂资源www在线| 1024精品合集| 欧美日韩一级片在线观看| 青青青伊人色综合久久| 精品第一国产综合精品aⅴ| 国产精品18久久久久久vr| 国产精品免费看片| 欧美综合在线视频| 伦理电影国产精品| 国产精品拍天天在线| 91久久久免费一区二区| 青青国产91久久久久久| 国产农村妇女精品| 欧美无砖专区一中文字| 毛片av中文字幕一区二区| 亚洲国产激情av| 欧美日韩一级黄| 国产.欧美.日韩| 亚洲国产另类av| 国产日韩欧美电影| 欧美日韩中文另类| 国产成人在线视频播放| 亚洲国产视频网站| 国产亚洲欧美色| 欧美日韩国产一区| 成人精品鲁一区一区二区| 亚洲综合一区二区三区| 欧美精品一区二区不卡 | 99精品国产视频| 日韩电影在线看| 综合在线观看色| 26uuu国产在线精品一区二区| 一本色道久久综合亚洲aⅴ蜜桃 | 久久这里只有精品6| 在线亚洲人成电影网站色www| 韩国精品在线观看| 午夜激情综合网| 亚洲欧美日韩国产一区二区三区| 日韩精品一区二区三区中文不卡 | 国产精品水嫩水嫩| 欧美人牲a欧美精品| 99精品视频在线观看| 狠狠色丁香婷婷综合| 亚洲曰韩产成在线| 中文字幕在线播放不卡一区| 日韩天堂在线观看| 制服丝袜在线91| 在线国产亚洲欧美| 99国产欧美久久久精品| 国产精品99久久不卡二区| 免费一级片91| 日韩精品免费视频人成| 亚洲国产精品天堂| 亚洲在线视频一区| 亚洲一区在线观看免费| 亚洲欧美一区二区在线观看| 中文字幕av资源一区| 久久久久国产成人精品亚洲午夜 | 欧美色成人综合| 色播五月激情综合网| jvid福利写真一区二区三区| 国产激情一区二区三区桃花岛亚洲| 另类成人小视频在线| 精品一二三四区| 国产一区二区伦理| 国产精品 欧美精品| 国产成人在线影院| 成人国产精品免费观看动漫| 国产成人免费视频一区| 国产成人免费av在线| 成人激情文学综合网| av一二三不卡影片| 99麻豆久久久国产精品免费| 粉嫩蜜臀av国产精品网站| 成人天堂资源www在线| 91亚洲精品久久久蜜桃网站| 色国产综合视频| 欧美精品一二三区| 日韩一区二区精品葵司在线| 精品国产一区二区三区四区四| 欧美成人video| 久久九九国产精品| 国产精品伦理一区二区| 伊人开心综合网| 五月激情综合网| 免费美女久久99| 国产激情视频一区二区在线观看 | 亚洲超碰97人人做人人爱| 免费高清在线一区| 国产91综合一区在线观看| 9色porny自拍视频一区二区| 欧美三级韩国三级日本一级| 日韩欧美综合一区| 18成人在线视频| 日本中文一区二区三区| 粉嫩aⅴ一区二区三区四区五区| 成人一区二区三区在线观看| 欧美在线免费视屏| 精品国产乱码久久久久久影片| 亚洲黄色在线视频| 亚洲妇女屁股眼交7| 国产自产视频一区二区三区| 不卡电影一区二区三区| 欧美丰满美乳xxx高潮www| 欧美国产97人人爽人人喊| 亚洲综合免费观看高清完整版 | 欧美成人国产一区二区| 中文字幕一区免费在线观看| 亚洲成av人在线观看| 国产精品一区二区在线播放| 欧美在线不卡一区| 久久精品夜色噜噜亚洲a∨| 亚洲第一成人在线| 成人av动漫网站| 精品国产凹凸成av人导航| 一区二区成人在线| 国产suv精品一区二区6| 7777女厕盗摄久久久| ...xxx性欧美| 国产老肥熟一区二区三区| 欧美精品电影在线播放| 亚洲欧美一区二区三区极速播放| 精品一区中文字幕| 欧美日本韩国一区| 夜色激情一区二区| 成人高清免费在线播放| 精品国产制服丝袜高跟| 天堂av在线一区| 欧美影视一区在线| 亚洲日本免费电影| 成人h动漫精品一区二| 国产午夜精品福利| 国内精品免费在线观看| 91精品欧美久久久久久动漫| 亚洲综合自拍偷拍| 99re6这里只有精品视频在线观看| 久久综合九色综合欧美98| 蜜臀精品久久久久久蜜臀| 欧美日韩在线播放三区四区| 亚洲视频一区二区在线| 成人app在线观看| 中文字幕乱码久久午夜不卡| 国产一区二区中文字幕| 精品动漫一区二区三区在线观看| 人禽交欧美网站| 日韩一级免费观看| 奇米色一区二区| 日韩亚洲欧美在线观看| 奇米综合一区二区三区精品视频| 制服丝袜亚洲色图| 奇米影视在线99精品| 精品久久久久久久人人人人传媒| 青青草97国产精品免费观看无弹窗版| 欧美日韩高清影院|