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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? id3.java

?? 數(shù)據(jù)挖掘分類算法:ID3采用JAVA語言編程實現(xiàn)
?? 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. *//* *    Id3.java *    Copyright (C) 1999 University of Waikato, Hamilton, New Zealand * */package weka.classifiers.trees;import weka.classifiers.Classifier;import weka.classifiers.Sourcable;import weka.core.Attribute;import weka.core.Capabilities;import weka.core.Instance;import weka.core.Instances;import weka.core.NoSupportForMissingValuesException;import weka.core.RevisionUtils;import weka.core.TechnicalInformation;import weka.core.TechnicalInformationHandler;import weka.core.Utils;import weka.core.Capabilities.Capability;import weka.core.TechnicalInformation.Field;import weka.core.TechnicalInformation.Type;import java.util.Enumeration;/** <!-- globalinfo-start --> * Class for constructing an unpruned decision tree based on the ID3 algorithm. Can only deal with nominal attributes. No missing values allowed. Empty leaves may result in unclassified instances. For more information see: <br/> * <br/> * R. Quinlan (1986). Induction of decision trees. Machine Learning. 1(1):81-106. * <p/> <!-- globalinfo-end --> * <!-- technical-bibtex-start --> * BibTeX: * <pre> * &#64;article{Quinlan1986, *    author = {R. Quinlan}, *    journal = {Machine Learning}, *    number = {1}, *    pages = {81-106}, *    title = {Induction of decision trees}, *    volume = {1}, *    year = {1986} * } * </pre> * <p/> <!-- technical-bibtex-end --> * <!-- options-start --> * Valid options are: <p/> *  * <pre> -D *  If set, classifier is run in debug mode and *  may output additional info to the console</pre> *  <!-- options-end --> * * @author Eibe Frank (eibe@cs.waikato.ac.nz) * @version $Revision: 1.23 $  */public class Id3   extends Classifier   implements TechnicalInformationHandler, Sourcable {  /** for serialization */  static final long serialVersionUID = -2693678647096322561L;    /** The node's successors. */   private Id3[] m_Successors;  /** Attribute used for splitting. */  private Attribute m_Attribute;  /** Class value if node is leaf. */  private double m_ClassValue;  /** Class distribution if node is leaf. */  private double[] m_Distribution;  /** Class attribute of dataset. */  private Attribute m_ClassAttribute;  /**   * Returns a string describing the classifier.   * @return a description suitable for the GUI.   */  public String globalInfo() {    return  "Class for constructing an unpruned decision tree based on the ID3 "      + "algorithm. Can only deal with nominal attributes. No missing values "      + "allowed. Empty leaves may result in unclassified instances. 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.ARTICLE);    result.setValue(Field.AUTHOR, "R. Quinlan");    result.setValue(Field.YEAR, "1986");    result.setValue(Field.TITLE, "Induction of decision trees");    result.setValue(Field.JOURNAL, "Machine Learning");    result.setValue(Field.VOLUME, "1");    result.setValue(Field.NUMBER, "1");    result.setValue(Field.PAGES, "81-106");        return result;  }  /**   * Returns default capabilities of the classifier.   *   * @return      the capabilities of this classifier   */  public Capabilities getCapabilities() {    Capabilities result = super.getCapabilities();    // attributes    result.enable(Capability.NOMINAL_ATTRIBUTES);    // class    result.enable(Capability.NOMINAL_CLASS);    result.enable(Capability.MISSING_CLASS_VALUES);    // instances    result.setMinimumNumberInstances(0);        return result;  }  /**   * Builds Id3 decision tree classifier.   *   * @param data the training data   * @exception Exception if classifier can't be built successfully   */  public void buildClassifier(Instances data) throws Exception {    // can classifier handle the data?    getCapabilities().testWithFail(data);    // remove instances with missing class    data = new Instances(data);    data.deleteWithMissingClass();        makeTree(data);  }  /**   * Method for building an Id3 tree.   *   * @param data the training data   * @exception Exception if decision tree can't be built successfully   */  private void makeTree(Instances data) throws Exception {    // Check if no instances have reached this node.    if (data.numInstances() == 0) {      m_Attribute = null;      m_ClassValue = Instance.missingValue();      m_Distribution = new double[data.numClasses()];      return;    }    // Compute attribute with maximum information gain.    double[] infoGains = new double[data.numAttributes()];    Enumeration attEnum = data.enumerateAttributes();    while (attEnum.hasMoreElements()) {      Attribute att = (Attribute) attEnum.nextElement();      infoGains[att.index()] = computeInfoGain(data, att);    }    m_Attribute = data.attribute(Utils.maxIndex(infoGains));        // Make leaf if information gain is zero.     // Otherwise create successors.    if (Utils.eq(infoGains[m_Attribute.index()], 0)) {      m_Attribute = null;      m_Distribution = new double[data.numClasses()];      Enumeration instEnum = data.enumerateInstances();      while (instEnum.hasMoreElements()) {        Instance inst = (Instance) instEnum.nextElement();        m_Distribution[(int) inst.classValue()]++;      }      Utils.normalize(m_Distribution);      m_ClassValue = Utils.maxIndex(m_Distribution);      m_ClassAttribute = data.classAttribute();    } else {      Instances[] splitData = splitData(data, m_Attribute);      m_Successors = new Id3[m_Attribute.numValues()];      for (int j = 0; j < m_Attribute.numValues(); j++) {        m_Successors[j] = new Id3();        m_Successors[j].makeTree(splitData[j]);      }    }  }  /**   * Classifies a given test instance using the decision tree.   *   * @param instance the instance to be classified   * @return the classification   * @throws NoSupportForMissingValuesException if instance has missing values   */  public double classifyInstance(Instance instance)     throws NoSupportForMissingValuesException {    if (instance.hasMissingValue()) {      throw new NoSupportForMissingValuesException("Id3: no missing values, "                                                   + "please.");    }    if (m_Attribute == null) {      return m_ClassValue;    } else {      return m_Successors[(int) instance.value(m_Attribute)].        classifyInstance(instance);    }  }  /**   * Computes class distribution for instance using decision tree.   *   * @param instance the instance for which distribution is to be computed   * @return the class distribution for the given instance

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美精品久久久久久久久老牛影院| 欧美人xxxx| 国产精品网曝门| 免费美女久久99| 欧美蜜桃一区二区三区| 国产精品久久久久婷婷二区次| 午夜免费欧美电影| 一本一道久久a久久精品综合蜜臀| 久久久久国产免费免费| 国产在线精品一区二区不卡了| 91精品国产一区二区三区蜜臀| 婷婷亚洲久悠悠色悠在线播放| 不卡视频在线观看| 亚洲精品视频在线观看网站| av影院午夜一区| 一区二区三区.www| 欧美精三区欧美精三区| 韩国理伦片一区二区三区在线播放| 91精品国产综合久久福利软件 | 亚洲一区二区三区在线看| 国内成+人亚洲+欧美+综合在线| 在线播放中文字幕一区| 久久国产视频网| 国产欧美日韩精品在线| 99久久国产综合精品麻豆| 亚洲乱码国产乱码精品精98午夜 | 久久久久久99精品| 国产精品资源网站| 亚洲成人动漫一区| 国产蜜臀av在线一区二区三区| 成+人+亚洲+综合天堂| 亚洲高清免费观看| 久久亚洲二区三区| 欧美老肥妇做.爰bbww视频| 精品一区二区影视| 亚洲男同性视频| 国产亚洲精品精华液| 欧美日韩成人一区| av影院午夜一区| 午夜不卡av在线| 国产精品国产三级国产| 精品久久一区二区三区| 欧美高清视频不卡网| 91丨porny丨在线| 国产aⅴ综合色| 九九视频精品免费| 天天色综合成人网| 亚洲精品伦理在线| 亚洲图片欧美激情| 91豆麻精品91久久久久久| 一区二区三区四区激情| 中文一区二区在线观看| 精品国产一二三| 精品日韩一区二区| 日韩欧美激情一区| 久久天天做天天爱综合色| 2023国产精品自拍| 国产欧美日产一区| 国产精品动漫网站| 一区二区三区精品视频| 一区二区在线观看视频| 午夜精品福利一区二区三区av| 亚洲高清不卡在线观看| 久久99在线观看| 成人白浆超碰人人人人| 色哟哟日韩精品| 91精品欧美一区二区三区综合在 | 国内精品国产三级国产a久久| 国产乱淫av一区二区三区| 99re热视频精品| 欧美日韩国产一级二级| 精品播放一区二区| 亚洲丝袜自拍清纯另类| 日韩av一区二区三区四区| 国产精品69久久久久水密桃| 色久综合一二码| 26uuu国产在线精品一区二区| 成人欧美一区二区三区在线播放| 亚洲一区二区偷拍精品| 久久99热狠狠色一区二区| 成人av在线电影| 日韩精品中文字幕一区| 伊人婷婷欧美激情| 国产成人综合自拍| 日韩欧美123| 性做久久久久久免费观看欧美| 免费视频最近日韩| 成人av免费在线观看| 久久午夜羞羞影院免费观看| 一区二区免费在线| 99久久久精品免费观看国产蜜| 日韩一级视频免费观看在线| 亚洲一区二区三区四区五区黄 | 成人动漫一区二区在线| 欧美www视频| 久久99热这里只有精品| 欧美区一区二区三区| 亚洲一区二区三区在线播放 | 免费观看一级欧美片| 91.xcao| 日本视频一区二区| 91精品国产综合久久福利| 亚洲成a人片在线不卡一二三区| 色综合中文字幕| 亚洲男人的天堂在线观看| a级精品国产片在线观看| 国产精品久久久久久久久久免费看 | 一区二区三区欧美日| 91蝌蚪porny九色| 夜夜嗨av一区二区三区网页| 日本乱人伦一区| 免费观看在线综合| 国产无人区一区二区三区| 北条麻妃国产九九精品视频| 中文字幕欧美一| 欧美日本在线视频| 国产乱色国产精品免费视频| 亚洲天堂成人在线观看| 67194成人在线观看| 国产一区在线观看麻豆| 亚洲免费观看在线视频| 日韩精品一区二| 91视频精品在这里| 久久99久久精品欧美| 亚洲免费电影在线| 日韩欧美在线观看一区二区三区| 狠狠色狠狠色综合系列| 亚洲精品第1页| 日韩精品一区二区三区在线观看 | 欧美一级久久久| 成人一区二区在线观看| 亚洲自拍偷拍综合| 国产精品婷婷午夜在线观看| 欧美军同video69gay| 成人av在线一区二区| 国产在线精品一区二区| 亚洲国产一二三| 亚洲色图制服丝袜| 国产欧美在线观看一区| 久久色.com| 久久久久久久久久电影| 日韩欧美高清dvd碟片| 欧美日本不卡视频| 日本高清无吗v一区| 91免费观看在线| 色999日韩国产欧美一区二区| 国产精品123区| 国产乱色国产精品免费视频| 久久国产精品99久久人人澡| 日本欧美一区二区三区| 日韩高清在线不卡| 日本中文在线一区| 麻豆精品一区二区综合av| 日本vs亚洲vs韩国一区三区| 日韩高清一区二区| 久久精品久久久精品美女| 极品少妇一区二区三区精品视频| 琪琪一区二区三区| 国内成+人亚洲+欧美+综合在线 | 欧美日韩在线三级| 这里只有精品99re| 精品国产91洋老外米糕| 久久香蕉国产线看观看99| 国产精品成人免费| 亚洲五月六月丁香激情| 蜜桃视频在线一区| 国产精品一卡二卡| 欧美色区777第一页| 欧美一区二区免费观在线| 久久久久高清精品| 亚洲午夜精品17c| 韩国精品在线观看| 欧美亚洲另类激情小说| 日韩欧美一级在线播放| 一色屋精品亚洲香蕉网站| 日韩国产欧美三级| 97精品电影院| 日韩一级片网站| 夜夜精品浪潮av一区二区三区| 麻豆极品一区二区三区| 色先锋aa成人| 国产精品久久综合| 麻豆高清免费国产一区| 91麻豆蜜桃一区二区三区| 精品久久久久久久久久久久久久久| 亚洲伦理在线精品| 国产91精品在线观看| 精品美女一区二区| 午夜国产精品一区| 欧美色视频在线观看| 亚洲免费在线视频一区 二区| 激情综合色综合久久| 欧美人妖巨大在线| 午夜私人影院久久久久| 色综合 综合色| 亚洲综合激情另类小说区| 91一区二区在线观看| |精品福利一区二区三区| 99re热这里只有精品视频| 国产精品久久三区|