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

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

?? j48.java

?? wekaUT是 university texas austin 開發的基于weka的半指導學習(semi supervised learning)的分類器
?? 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.trees.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.1.1.1 $ */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一区二区三区免费野_久草精品视频
激情综合网av| 99国内精品久久| 一区二区在线观看不卡| 国产美女一区二区| 欧美激情综合五月色丁香小说| 91色在线porny| 国产电影精品久久禁18| 精品中文字幕一区二区| 激情都市一区二区| 九九精品一区二区| 国产精品亚洲一区二区三区在线| 国产盗摄视频一区二区三区| 国产一区在线精品| 成人综合激情网| 一本一道久久a久久精品| 欧美性色黄大片| 欧美一级片免费看| 欧美成人乱码一区二区三区| 久久精品视频在线看| 国产精品乱子久久久久| 一区二区三区蜜桃| 奇米影视一区二区三区小说| 国产精品自产自拍| 99久久久久久| 这里只有精品99re| 久久网站最新地址| 日韩精品国产欧美| 99久久精品国产一区| 国产精品资源站在线| 99re热视频精品| 欧美久久婷婷综合色| 精品国产a毛片| 国产一区中文字幕| 91女厕偷拍女厕偷拍高清| 欧美日韩免费观看一区三区| 欧美va亚洲va在线观看蝴蝶网| 欧美激情一区二区在线| 一区二区在线观看不卡| 韩国av一区二区三区在线观看| 成人黄页在线观看| 欧美二区三区的天堂| 久久久不卡网国产精品一区| 亚洲一线二线三线久久久| 老司机精品视频一区二区三区| 99视频热这里只有精品免费| 6080午夜不卡| 国产精品免费视频网站| 日韩av一区二区在线影视| jiyouzz国产精品久久| 91精品一区二区三区久久久久久| 国产欧美日产一区| 日韩精品亚洲专区| 成人激情动漫在线观看| 欧美一级精品大片| 亚洲美女在线一区| 国产精品综合二区| 欧美日本在线视频| 成人免费一区二区三区在线观看| 麻豆国产欧美日韩综合精品二区 | 国产成人在线影院 | 国产日韩欧美高清| 午夜精品久久久久久久99樱桃| 国产成人av一区二区三区在线| 欧美日韩成人高清| 亚洲日本护士毛茸茸| 国产在线视视频有精品| 欧美精品在线一区二区| 亚洲欧美在线aaa| 国产麻豆精品久久一二三| 正在播放亚洲一区| 午夜精品久久一牛影视| 精品国产免费久久| 久久久久久久性| 日韩在线a电影| 欧美亚洲日本国产| 亚洲欧洲综合另类| 成人免费视频一区| 国产日本欧美一区二区| 黑人精品欧美一区二区蜜桃| 欧美日韩激情在线| 亚洲一区中文日韩| 色综合激情久久| 国产精品美日韩| 国产一区二区三区香蕉| 日韩欧美国产三级| 人人爽香蕉精品| 精品国产乱码久久| 久久国产尿小便嘘嘘| 欧美一区二区在线看| 亚洲成人动漫在线观看| 欧美在线小视频| 亚洲黄一区二区三区| 97精品国产露脸对白| 日韩理论在线观看| 91网站在线观看视频| 自拍偷自拍亚洲精品播放| 99久久精品国产导航| 国产精品久久久久一区| 99久久99久久久精品齐齐| 中文字幕成人av| 成人av午夜影院| 国产精品久久久久国产精品日日| 成人激情免费视频| 亚洲品质自拍视频| 欧洲精品在线观看| 亚洲成av人片在线| 7777精品伊人久久久大香线蕉| 亚洲不卡av一区二区三区| 精品视频999| 日韩精品成人一区二区三区| 91精品国模一区二区三区| 久久电影国产免费久久电影| 精品久久久久久久久久久久久久久久久 | 久久九九全国免费| 国产成人99久久亚洲综合精品| 天天综合天天做天天综合| 欧美精三区欧美精三区| 麻豆精品久久久| 国产女主播视频一区二区| 成人激情午夜影院| 亚洲一区二区三区不卡国产欧美| 欧美精品第1页| 国产美女主播视频一区| 亚洲欧洲美洲综合色网| 欧美性猛交xxxxxxxx| 青草国产精品久久久久久| 2020国产精品自拍| 99久久免费视频.com| 午夜精品一区二区三区电影天堂 | 亚洲美女偷拍久久| 97精品国产露脸对白| 亚洲国产精品一区二区久久恐怖片| 欧美乱熟臀69xxxxxx| 黄色资源网久久资源365| 中文字幕精品在线不卡| 色狠狠av一区二区三区| 日韩电影免费一区| 国产精品色呦呦| 欧美亚洲动漫精品| 国内精品伊人久久久久av一坑| 中文字幕二三区不卡| 欧美性做爰猛烈叫床潮| 久久国产精品色婷婷| 国产精品女上位| 欧美军同video69gay| 国产成人8x视频一区二区| 亚洲一区视频在线观看视频| 亚洲精品在线免费播放| 91视频国产观看| 美女性感视频久久| 欧美激情一区二区三区在线| 欧美色大人视频| 国产69精品久久99不卡| 国产精品一级二级三级| 亚洲免费观看高清在线观看| 日韩久久精品一区| 91免费版pro下载短视频| 久久成人免费网站| 夜夜精品视频一区二区| 久久久精品黄色| 7777精品伊人久久久大香线蕉完整版| 午夜久久久久久久久| 国产成人日日夜夜| 国产精品中文字幕欧美| 久久久777精品电影网影网| 精品视频在线视频| 成人午夜又粗又硬又大| 日韩av一级片| 悠悠色在线精品| 久久精品男人的天堂| 日韩一级精品视频在线观看| 91小视频免费观看| 国产乱国产乱300精品| 日韩精品色哟哟| 亚洲自拍与偷拍| 国产精品久久久久天堂| 久久综合精品国产一区二区三区 | 欧美在线|欧美| 成人小视频免费在线观看| 精品无人区卡一卡二卡三乱码免费卡| 亚洲理论在线观看| 国产精品久久久久久久久晋中 | 亚洲电影一区二区| 久久久精品天堂| 精品嫩草影院久久| 91精品午夜视频| 欧美日韩成人一区二区| 欧美影视一区在线| 久久精品亚洲国产奇米99| 91在线视频播放| 日韩电影在线免费观看| 亚洲一区二区三区影院| 亚洲欧美视频在线观看视频| 国产精品高清亚洲| 国产精品乱子久久久久| 国产精品久久久久三级| 国产精品美女久久久久久久久 | 国产亚洲欧美在线| 久久精品在线免费观看| 久久久久国产精品麻豆|