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

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

?? j48.java

?? 代碼是一個分類器的實現,其中使用了部分weka的源代碼。可以將項目導入eclipse運行
?? 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;import weka.classifiers.Classifier;import weka.classifiers.Sourcable;import weka.classifiers.trees.j48.BinC45ModelSelection;import weka.classifiers.trees.j48.C45ModelSelection;import weka.classifiers.trees.j48.C45PruneableClassifierTree;import weka.classifiers.trees.j48.ClassifierTree;import weka.classifiers.trees.j48.ModelSelection;import weka.classifiers.trees.j48.PruneableClassifierTree;import weka.core.AdditionalMeasureProducer;import weka.core.Capabilities;import weka.core.Drawable;import weka.core.Instance;import weka.core.Instances;import weka.core.Matchable;import weka.core.Option;import weka.core.OptionHandler;import weka.core.Summarizable;import weka.core.TechnicalInformation;import weka.core.TechnicalInformationHandler;import weka.core.Utils;import weka.core.WeightedInstancesHandler;import weka.core.TechnicalInformation.Field;import weka.core.TechnicalInformation.Type;import java.util.Enumeration;import java.util.Vector;/** <!-- globalinfo-start --> * Class for generating a pruned or unpruned C4.5 decision tree. For more information, see<br/> * <br/> * Ross Quinlan (1993). C4.5: Programs for Machine Learning. Morgan Kaufmann Publishers, San Mateo, CA. * <p/> <!-- globalinfo-end --> * <!-- technical-bibtex-start --> * BibTeX: * <pre> * &#64;book{Quinlan1993, *    address = {San Mateo, CA}, *    author = {Ross Quinlan}, *    publisher = {Morgan Kaufmann Publishers}, *    title = {C4.5: Programs for Machine Learning}, *    year = {1993} * } * </pre> * <p/> <!-- technical-bibtex-end --> * <!-- options-start --> * Valid options are: <p/> *  * <pre> -U *  Use unpruned tree.</pre> *  * <pre> -C &lt;pruning confidence&gt; *  Set confidence threshold for pruning. *  (default 0.25)</pre> *  * <pre> -M &lt;minimum number of instances&gt; *  Set minimum number of instances per leaf. *  (default 2)</pre> *  * <pre> -R *  Use reduced error pruning.</pre> *  * <pre> -N &lt;number of folds&gt; *  Set number of folds for reduced error *  pruning. One fold is used as pruning set. *  (default 3)</pre> *  * <pre> -B *  Use binary splits only.</pre> *  * <pre> -S *  Don't perform subtree raising.</pre> *  * <pre> -L *  Do not clean up after the tree has been built.</pre> *  * <pre> -A *  Laplace smoothing for predicted probabilities.</pre> *  * <pre> -Q &lt;seed&gt; *  Seed for random data shuffling (default 1).</pre> *  <!-- options-end --> * * @author Eibe Frank (eibe@cs.waikato.ac.nz) * @version $Revision: 1.5 $ */public class J48   extends Classifier   implements OptionHandler, Drawable, Matchable, Sourcable,              WeightedInstancesHandler, Summarizable, AdditionalMeasureProducer,              TechnicalInformationHandler {  /** for serialization */  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. */  private boolean m_noCleanup = false;  /** Random number seed for reduced-error pruning. */  private int m_Seed = 1;  /**   * Returns a string describing classifier   * @return a description suitable for   * displaying in the explorer/experimenter gui   */  public String globalInfo() {    return  "Class for generating a pruned or unpruned C4.5 decision tree. For more "      + "information, see\n\n"      + getTechnicalInformation().toString();  }  /**   * Returns an instance of a TechnicalInformation object, containing    * detailed information about the technical background of this class,   * e.g., paper reference or book this class is based on.   *    * @return the technical information about this class   */  public TechnicalInformation getTechnicalInformation() {    TechnicalInformation 	result;        result = new TechnicalInformation(Type.BOOK);    result.setValue(Field.AUTHOR, "Ross Quinlan");    result.setValue(Field.YEAR, "1993");    result.setValue(Field.TITLE, "C4.5: Programs for Machine Learning");    result.setValue(Field.PUBLISHER, "Morgan Kaufmann Publishers");    result.setValue(Field.ADDRESS, "San Mateo, CA");        return result;  }  /**   * Returns default capabilities of the classifier.   *   * @return      the capabilities of this classifier   */  public Capabilities getCapabilities() {    Capabilities      result;        try {      if (!m_reducedErrorPruning)        result = new C45PruneableClassifierTree(null, !m_unpruned, m_CF, m_subtreeRaising, !m_noCleanup).getCapabilities();      else        result = new PruneableClassifierTree(null, !m_unpruned, m_numFolds, !m_noCleanup, m_Seed).getCapabilities();    }    catch (Exception e) {      result = new Capabilities(this);    }        result.setOwner(this);        return result;  }    /**   * Generates the classifier.   *   * @param instances the data to train the classifier with   * @throws 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_Seed);    m_root.buildClassifier(instances);    if (m_binarySplits) {      ((BinC45ModelSelection)modSelection).cleanup();    } else {      ((C45ModelSelection)modSelection).cleanup();    }  }  /**   * Classifies an instance.   *   * @param instance the instance to classify   * @return the classification for the instance   * @throws 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.   *   * @param instance the instance to calculate the class probabilities for   * @return the class probabilities   * @throws Exception if distribution can't be computed successfully   */  public final double [] distributionForInstance(Instance instance)        throws Exception {    return m_root.distributionForInstance(instance, m_useLaplace);  }  /**   *  Returns the type of graph this classifier   *  represents.   *  @return Drawable.TREE   */     public int graphType() {      return Drawable.TREE;  }  /**   * Returns graph describing the tree.   *   * @return the graph describing the tree   * @throws Exception if graph can't be computed   */  public String graph() throws Exception {    return m_root.graph();  }  /**   * Returns tree in prefix order.   *   * @return the tree in prefix order   * @throws Exception if something goes wrong   */  public String prefix() throws Exception {        return m_root.prefix();  }  /**   * Returns tree as an if-then statement.   *   * @param className the name of the Java class    * @return the tree as a Java if-then type statement   * @throws 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>   *   * -Q <br>   * The seed for reduced-error pruning. <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"));    newVector.      addElement(new Option("\tSeed for random data shuffling (default 1).",			    "Q", 1, "-Q <seed>"));    return newVector.elements();  }  /**   * Parses a given list of options.   *    <!-- options-start -->   * Valid options are: <p/>   *    * <pre> -U   *  Use unpruned tree.</pre>   *    * <pre> -C &lt;pruning confidence&gt;   *  Set confidence threshold for pruning.   *  (default 0.25)</pre>   *    * <pre> -M &lt;minimum number of instances&gt;   *  Set minimum number of instances per leaf.   *  (default 2)</pre>   *    * <pre> -R   *  Use reduced error pruning.</pre>   *    * <pre> -N &lt;number of folds&gt;   *  Set number of folds for reduced error   *  pruning. One fold is used as pruning set.   *  (default 3)</pre>   *    * <pre> -B   *  Use binary splits only.</pre>   *    * <pre> -S   *  Don't perform subtree raising.</pre>   *    * <pre> -L   *  Do not clean up after the tree has been built.</pre>   *    * <pre> -A   *  Laplace smoothing for predicted probabilities.</pre>   *    * <pre> -Q &lt;seed&gt;   *  Seed for random data shuffling (default 1).</pre>   *    <!-- options-end -->   *   * @param options the list of options as an array of strings   * @throws 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);

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美国产成人精品| 不卡的电影网站| 中文字幕不卡在线观看| 91麻豆视频网站| 首页亚洲欧美制服丝腿| 欧美极品少妇xxxxⅹ高跟鞋| 亚洲欧洲一区二区在线播放| 97久久超碰国产精品| 色av一区二区| 蜜臀av在线播放一区二区三区| 久久麻豆一区二区| 色哦色哦哦色天天综合| 激情综合网av| 亚洲成av人片一区二区| 91麻豆精品国产无毒不卡在线观看| 国产91精品一区二区麻豆网站| 亚洲一区二区视频| 日本一区二区视频在线观看| 欧美久久久影院| av中文字幕亚洲| 精品亚洲免费视频| 亚洲成a天堂v人片| 国产欧美一区视频| 欧美电影免费观看高清完整版在 | 欧美日本精品一区二区三区| 国产成人自拍网| 久久se这里有精品| 成人做爰69片免费看网站| 久久在线免费观看| 亚洲bt欧美bt精品| 欧美刺激午夜性久久久久久久| 成人免费高清视频| 亚洲自拍偷拍图区| 国产日韩欧美在线一区| 日韩一级大片在线| gogogo免费视频观看亚洲一| 成人性生交大片免费看在线播放| 亚洲国产中文字幕| 国产精品久久久久四虎| 精品国产乱码久久久久久久 | 日本中文一区二区三区| 亚洲国产精品尤物yw在线观看| 国产精品欧美一区喷水| 久久久久久久久97黄色工厂| 欧美电视剧在线看免费| 欧美日韩精品福利| 色综合久久久久综合体| 一本到一区二区三区| 国产一区中文字幕| 国产精品乱码一区二区三区软件 | 亚洲一区二区在线免费观看视频| 久久精品人人爽人人爽| 日韩一区二区中文字幕| 欧美精品在线视频| 欧美性欧美巨大黑白大战| 欧美影院一区二区三区| 丁香婷婷综合色啪| 成人高清视频免费观看| 成人黄色大片在线观看| 丁香另类激情小说| 国产成人精品影视| 成人午夜电影小说| 国产69精品久久久久777| 丰满放荡岳乱妇91ww| 风间由美性色一区二区三区| 成人性视频免费网站| 99久久国产免费看| 日韩成人一级片| 亚洲美女免费在线| 日本一区二区三区久久久久久久久不| 国产不卡视频一区二区三区| 国产大片一区二区| 国产91精品入口| 99久久99久久精品免费看蜜桃| 色婷婷精品大在线视频| 在线亚洲+欧美+日本专区| 久久综合av免费| 久久精品人人做人人爽97| 国产精品灌醉下药二区| 一区二区三区四区在线| 亚洲18色成人| 麻豆精品一二三| 懂色av一区二区三区蜜臀| 99精品国产热久久91蜜凸| 欧美三级一区二区| 日韩三级免费观看| 国产日韩欧美不卡| 国产精品久久久久aaaa| 亚洲黄色免费电影| 亚洲综合成人网| 亚洲1区2区3区4区| 国产一区二区三区免费看| 欧美日韩1234| 在线区一区二视频| 日韩视频永久免费| 国产精品女同一区二区三区| 亚洲高清不卡在线观看| 国产乱码精品一区二区三| 色综合天天视频在线观看| 欧美一区二区三区在线视频| 国产无遮挡一区二区三区毛片日本| 亚洲日本va在线观看| 亚洲一区二区高清| 国产成人综合在线播放| 欧美区在线观看| 国产欧美久久久精品影院| 亚洲图片欧美综合| 九九久久精品视频| 国产乱人伦偷精品视频免下载| 国产成人aaa| 91久久精品一区二区三| 精品国产91洋老外米糕| 亚洲精品ww久久久久久p站| 久久av资源站| 91免费在线看| 欧美一卡二卡三卡四卡| 久久精品欧美一区二区三区麻豆| 亚洲人成人一区二区在线观看| 午夜久久久久久| 国产99精品国产| 欧美一级免费大片| 一区二区三区四区中文字幕| 欧美午夜电影在线播放| 色欧美片视频在线观看| 欧美日本韩国一区二区三区视频 | 色综合av在线| 久久久久久亚洲综合影院红桃 | 一区二区三区四区在线免费观看| 国产精品一二三区在线| 91精品欧美一区二区三区综合在| 中文在线一区二区| 午夜成人在线视频| 在线观看日韩高清av| 亚洲欧洲在线观看av| 国产mv日韩mv欧美| 国产午夜精品一区二区三区嫩草| 蜜臂av日日欢夜夜爽一区| 欧美日韩国产综合一区二区| 一区二区三区在线观看网站| eeuss鲁一区二区三区| 国产午夜精品在线观看| 国产一区二区三区在线观看精品| 在线免费观看成人短视频| 日韩一区中文字幕| 波多野结衣欧美| 日韩视频免费观看高清完整版| 亚洲综合在线电影| 色拍拍在线精品视频8848| 亚洲人成网站影音先锋播放| 国产一区二区三区免费看 | 久久99最新地址| 91精品福利在线一区二区三区 | 亚洲国产精品99久久久久久久久 | 久久综合久色欧美综合狠狠| 另类综合日韩欧美亚洲| 欧美一区二区视频在线观看2020| 五月婷婷欧美视频| 欧美日韩高清一区二区三区| 亚洲妇熟xx妇色黄| 欧美性受xxxx黑人xyx性爽| 亚洲综合色网站| 欧美婷婷六月丁香综合色| 亚洲gay无套男同| 337p亚洲精品色噜噜噜| 日韩精品电影在线| 精品久久人人做人人爰| 国产一区二区精品久久| 国产精品久久久久久久蜜臀| 欧美另类z0zxhd电影| 亚洲人成网站在线| av成人老司机| 亚洲精品伦理在线| 欧美精品 国产精品| 九九九精品视频| 精品999在线播放| 久久99国产精品久久99| 国产精品无圣光一区二区| 中文字幕亚洲一区二区av在线 | 亚洲色图另类专区| 欧美日韩在线观看一区二区 | 欧美日韩亚洲综合在线| 开心九九激情九九欧美日韩精美视频电影| 精品日韩欧美在线| 国产老妇另类xxxxx| 亚洲女同一区二区| 日韩视频123| 色综合天天综合狠狠| 久久精品久久综合| 亚洲免费av高清| 欧美一区二区精品久久911| www.欧美.com| 国内偷窥港台综合视频在线播放| 亚洲精品videosex极品| 久久久精品国产免费观看同学| 欧美日韩精品一区二区三区蜜桃| 成人午夜伦理影院| 黄色资源网久久资源365| 一区二区免费在线播放| 国产亚洲精品中文字幕| 337p亚洲精品色噜噜狠狠|