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

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

?? tddtinducer.java

?? Decision Tree 決策樹算法ID3 數據挖掘 分類
?? JAVA
?? 第 1 頁 / 共 5 頁
字號:
package id3;
import java.util.*;
import shared.*;
import shared.Error;

/** Top-down decision-tree (TDDT) inducer induces decision trees
 * top-down by building smaller training sets and inducing trees
 * for them recursively. The decision tree built has categorizers
 * at each node, and these determine how to branch, i.e., to
 * which child to branch, or whether to classify.  The common
 * cases are: AttrCategorizers, which simply return a given value
 * for an attribute in the node, and ThresholdCategorizers, which
 * return 0 or one based on whether an attribute is less than or
 * greater than a given threshold (valid only for real attributes).
 * The leaves are usually constant categorizers, i.e., they just
 * return a constant value independent of the instance.			<P>
 * The induction algorithm calls best_split, a pure virtual
 * function, to determine the best root split.  Once the split has
 * been chosen, the data in the node is split according to the
 * categorizer best_split returns.  A node is formed, and the
 * algorithm is called recursively with each of the children.
 * Once each child returns with a subtree, we connect them to the
 * root we split. ID3Inducer, for example, implements the
 * best_split using information gain, but other methods are
 * possible. best_split() can return any categorizer, thus opening
 * the possibility for oblique trees with perceptrons at nodes,
 * recursive trees, etc.  The leaves can also be of any
 * classifier, thus perceptron-trees (Utgoff) can be created,
 * or a nearest-neighbor within a leaf, etc.					<P>
 * Complexity   :									<P>
 * The complexity of train() is proportional to the number of
 * nodes in the resulting tree times the time for deciding on
 * the split() categorizer (done by the derived classes).
 * predict() takes time proportional to the sum of the
 * categorizers time over the path from the root to a leaf node.	<P>
 * Enhancements :									<P>
 * We may speed things up by having an option to test only
 * splits where the class label changes.  For some measures
 * (e.g., entropy), it can be shown that a split will never be
 * made between two instances with the same class label
 * (Fayyad IJCAI 93 page 1022, Machine Learning journal Vol 8,
 * no 1, page 87, 1992). We may wish to discretize the real values
 * first. By making them linear discrete, we can use the regular
 * counters and things will be faster (note however that the split
 * will usually remain special since it's a binary threshold split,
 * not a multi-way split).								<P>
 * Another problem is with attributes that have many values, for
 * example social-security-number.  Computing all cut points can
 * be very expensive.  We may want to skip such attributes by
 * claiming that each value must have at least some number of
 * instances.  Utgoff in ML94 (page 322) mentions that ID slows
 * his system down considerably.  The problem of course is that if
 * you threshold, it sometimes make sense to split on such
 * attributes.  Taken to an extreme, if we had a real "real-value,"
 * all values would be different with probability 1, and hence we
 * would skip such an attribute.							<P>
 * To speed things up, we may want to have an Inducer that
 * accepts a decision tree and builds stuff in it (vs. getting
 * a graph). Other options allow for doing the recursion by
 * calling a function instead of creating the actual class.
 * The advantage of the current method is that it allows a
 * subclass to keep track of the number of levels (useful for
 * lookahead or something). Yet another option is to "recycle"
 * inducers by using our "this" and just changing the training set.	<P>
 * We currently split instances but keep the original structure,
 * that is, we don't actually delete the attribute tested on. It
 * may be faster in some cases to actually create a new List
 * without the attribute.  The disadvantage is that for multi-valued
 * attributes we may wish to branch again, so we can't always delete.
 * The same goes for tests which are not attributes (e.g.,
 * conjunctions).
 * @author James Louis 12/07/2000 Ported to Java.
 * @author Steve Gustafson 12/07/2000 Ported to Java.
 * @author Chia-Hsin Li 1/03/95 Added Options.
 * @author Ronny Kohavi 9/06/93 Initial revision (.h,.c)
 */
abstract public class TDDTInducer extends Inducer
{
   //ENUMS
    /** Pruning method value.
     */    
      public static final byte none = 0;           /*  PruningMethod enum */
      /** Pruning method value.
       */      
      public static final byte confidence = 1;     /*                     */ 
      /** Pruning method value.
       */      
      public static final byte penalty = 2;        /*                     */ 
      /** Pruning method value.
       */      
      public static final byte linear  = 3;        /*                     */ 
      /** Pruning method value.
       */      
      public static final byte KLdistance = 4;     /*                     */ 
      /** Pruning method value.
       */      
      public static final byte lossConfidence = 5; /*                     */ 
      /** Pruning method value.
       */      
      public static final byte lossLaplace = 6;    /*                     */ 
      
      /** LeafDistType value.
       */      
      public static final byte allOrNothing = 0;      /* LeafDistType enum */ 
      /** LeafDistType value.
       */      
      public static final byte frequencyCounts = 1;   /*                   */ 
      /** LeafDistType value.
       */      
      public static final byte laplaceCorrection = 2; /*                   */ 
      /** LeafDistType value.
       */      
      public static final byte evidenceProjection = 3;/*                   */ 

      /** Evaluation metric value.
       */      
      public static final byte error = 0;    /* EvalMetric enum */ 
      /** Evaluation metric value.
       */      
      public static final byte MSE = 1;      /*                 */ 
      /** Evaluation metric value.
       */      
      public static final byte logLoss = 2;  /*                 */ 
   //END ENUMS


   private static int MIN_INSTLIST_DRIBBLE = 5000;
   private static String MAX_LEVEL_HELP = "The maximum number of levels to grow.  0 "
   +"implies no limit.";
   private static int DEFAULT_MAX_LEVEL = 0;

   private static String LB_MSW_HELP = "This option specifies the value of lower bound "
  +"of the weight while calculating the minimum split "
  +"(overrides weight option).  Set to 0 to have the value determined "
  +"automatically depending on the total weight of the training set.";
   private static double DEFAULT_LB_MSW = 1;

   private static String UB_MSW_HELP = "This option specifies the value of upper bound "
  +"of the weight while calculating the minimum split (overrides lower bound).";
    private static double DEFAULT_UB_MSW = 25;

   private static String MS_WP_HELP = "This option chooses the value of "
  +"the weight percent while calculating the minimum split.";
    private static double DEFAULT_MS_WP = 0;

   private static String NOM_LBO_HELP = "This option specifies if only the lower bound "
  +"will be used for calculating the minimum split for nominal-valued "
  +"attributes.";
    private static boolean DEFAULT_NOM_LBO = false;

   private static String DEBUG_HELP = "This option specifies whether to display the "
  +"debug information while displaying the graph.";
private static boolean DEFAULT_DEBUG = false;

/** Indicates edges representing unknown values should be processed. TRUE 
      indicates unknown edges should be, FALSE otherwise. **/
   private static String UNKNOWN_EDGES_HELP = "This option specifies whether or not to "
  +"allow outgoing UNKNOWN edges from each node. ";
    private static boolean DEFAULT_UNKNOWN_EDGES = true;

   // This option is currently not enabled.
//private static String EMPTY_NODE_PARENT_DIST_HELP = "Should empty nodes get the "
//+"distribution of the parent or zeros";
private static boolean DEFAULT_EMPTY_NODE_PARENT_DIST = false;

   private static String PARENT_TIE_BREAKING_HELP = "Should ties be broken in favor of "
+"the majority category of the parent";
private static boolean DEFAULT_PARENT_TIE_BREAKING = true;

// The following option is currently not enabled.
//const MString PRUNING_BRANCH_REPLACEMENT_HELP = "Should replacing a node "
//"with its largest subtree be allowed during pruning";
   private static boolean DEFAULT_PRUNING_BRANCH_REPLACEMENT = false;

private static String ADJUST_THRESHOLDS_HELP = "Should theshold values be adjusted "
+"to the values of instances";
   private static boolean DEFAULT_ADJUST_THRESHOLDS = false;

private static String PRUNING_METHOD_HELP = "Which algorithm should be used for "
+"pruning.  (If not NONE and PRUNING_FACTOR is 0, a node will be made a leaf "
+"if its potential children would not improve the error count)";
   private static byte DEFAULT_PRUNING_METHOD = confidence;

   private String PRUNING_FACTOR_HELP = "Pruning factor in standard deviations. "
   +"(high value -> more pruning), zero is no pruning, 2.5 is heavy pruning";
   private static double DEFAULT_PRUNING_FACTOR = 0.0; //change this to .6925

   
   
private static String CONT_MDL_ADJUST_HELP = "When TRUE, mutual information for "
+"real attributes is lowered based on MDL";
  private static boolean DEFAULT_CONT_MDL_ADJUST = false;

private static String SMOOTH_INST_HELP = "Set the number of values on each side "
+"of a given entropy value to use for smoothing (0 turns off smoothing).";
   private static int DEFAULT_SMOOTH_INST = 0;

private static String SMOOTH_FACTOR_HELP = "Set the constant for the exponential "
+"distribution used to smooth.";
   private static double DEFAULT_SMOOTH_FACTOR = 0.75;

private static String LEAF_DIST_TYPE_HELP = "This option selects the type of "
+"distribution to create at leaf nodes.  All-or-nothing picks the majority "
+"category and places all weight there.  This is the default.  "
+"Frequency-counts compute the distribution as normalized counts of the "
+"occurance of each class at this leaf.  Laplace-correction uses the "
+"frequency counts but applies a laplace correction of M_ESTIMATE_FACTOR.  "
+"Evidence-projection uses the evidence projection algorithm to correct "
+"the frequency counts.  EVIDENCE_FACTOR is the evidence scaling factor "
+"for the correction.";
   private static byte defaultLeafDistType = allOrNothing;

private static String M_ESTIMATE_FACTOR_HELP = "This option determines the factor "
+"by which to scale the log number of instances when computing an "
+"evidence projection";
  private static double DEFAULT_LEAF_M_ESTIMATE_FACTOR = 0.0;

private static String EVIDENCE_FACTOR_HELP = "This option determines the factor "
+"by which to scale the log number of instances when computing an "
+"evidence projection";
   private static double DEFAULT_LEAF_EVIDENCE_FACTOR = 1.0;

private static String EVAL_METRIC_HELP = "The measure by which the induced tree will "
+"be evaluated. Changing this may affect induction and pruning.";
   private static byte DEFAULT_EVALUATION_METRIC = error;

   private static int totalNodesNum = 0;

   private static int callCount = 0;

   private static int totalAttr = 0;


   private int level; 
   private CGraph cgraph; 
   private DTCategorizer decisionTreeCat;
   private double totalInstWeight;
   private boolean haveContinuousAttributes, errorprune = false;
   private TDDTOptions tddtOptions;

   /** Constructor.
    * @param dscr	The description of the inducer.
    */
   public TDDTInducer(String dscr)
   { 
      super(dscr); 

      tddtOptions = new TDDTOptions();

      CGraph aCgraph = null;
      level = 0;
      cgraph = aCgraph;
      decisionTreeCat = null;
      totalInstWeight = -1; //illegal value;
      
      //this is arbirary = no schema yet
      haveContinuousAttributes = false;

      tddtOptions.maxLevel = DEFAULT_MAX_LEVEL;
      tddtOptions.lowerBoundMinSplitWeight = DEFAULT_LB_MSW;
      tddtOptions.upperBoundMinSplitWeight = DEFAULT_UB_MSW;
      tddtOptions.minSplitWeightPercent = DEFAULT_MS_WP;
      tddtOptions.nominalLBoundOnly = DEFAULT_NOM_LBO;
      tddtOptions.debug = DEFAULT_DEBUG;
      tddtOptions.unknownEdges = DEFAULT_UNKNOWN_EDGES;
      tddtOptions.splitScoreCriterion = SplitScore.defaultSplitScoreCriterion;
      tddtOptions.emptyNodeParentDist = DEFAULT_EMPTY_NODE_PARENT_DIST;
      tddtOptions.parentTieBreaking = DEFAULT_PARENT_TIE_BREAKING;
      tddtOptions.pruningMethod = DEFAULT_PRUNING_METHOD;
      tddtOptions.pruningBranchReplacement = DEFAULT_PRUNING_BRANCH_REPLACEMENT;
      tddtOptions.adjustThresholds = DEFAULT_ADJUST_THRESHOLDS;
      tddtOptions.pruningFactor = DEFAULT_PRUNING_FACTOR;
      tddtOptions.contMDLAdjust = DEFAULT_CONT_MDL_ADJUST;
      tddtOptions.smoothInst = DEFAULT_SMOOTH_INST;
      tddtOptions.smoothFactor = DEFAULT_SMOOTH_FACTOR;
      tddtOptions.leafDistType = defaultLeafDistType;
      tddtOptions.MEstimateFactor = DEFAULT_LEAF_M_ESTIMATE_FACTOR;
      tddtOptions.evidenceFactor = DEFAULT_LEAF_EVIDENCE_FACTOR;
      tddtOptions.evaluationMetric = DEFAULT_EVALUATION_METRIC;

   }

   /** Constructor.
    * @param descr The description of this inducer.
    * @param aCgraph The CGraph that will hold the decision tree.
    */
   public TDDTInducer(String descr, CGraph aCgraph)
{
   super(descr);
   level = 0;

   tddtOptions = new TDDTOptions();

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
青青青伊人色综合久久| 一区二区三区波多野结衣在线观看 | av电影天堂一区二区在线观看| 久久99精品国产麻豆婷婷| 奇米影视在线99精品| 日韩制服丝袜av| 免费成人你懂的| 国产一区二区剧情av在线| 国产精选一区二区三区| 国产福利91精品| 成人一区二区视频| 一本到一区二区三区| 欧美偷拍一区二区| 日韩一区二区三区视频在线观看| 欧美成人一级视频| 国产三级三级三级精品8ⅰ区| 国产农村妇女精品| 亚洲激情校园春色| 美国欧美日韩国产在线播放| 国产伦精品一区二区三区免费迷 | 欧美电影免费观看高清完整版在 | 亚洲人成电影网站色mp4| 夜夜夜精品看看| 蜜桃久久久久久久| 成人美女视频在线观看| 欧美在线免费观看亚洲| 日韩欧美国产成人一区二区| 国产日韩欧美综合一区| 亚洲免费在线看| 日韩av在线免费观看不卡| 国产乱码精品1区2区3区| 99久久国产综合精品麻豆| 欧美日韩色综合| 国产偷国产偷亚洲高清人白洁| 亚洲欧美一区二区久久| 精品亚洲国产成人av制服丝袜| 成人国产视频在线观看| 欧美久久一二区| 国产精品女同一区二区三区| 日韩国产精品久久久| 成人午夜精品一区二区三区| 欧美老女人在线| 国产精品动漫网站| 久久成人久久爱| 日本高清不卡一区| 国产亚洲欧美一区在线观看| 亚洲成国产人片在线观看| 成人网在线播放| 日韩欧美一二三四区| 亚洲愉拍自拍另类高清精品| 国产aⅴ综合色| 日韩免费高清av| 亚洲成人tv网| 色视频一区二区| 国产精品伦理在线| 国产精品一区二区在线看| 6080日韩午夜伦伦午夜伦| 亚洲精品高清视频在线观看| 成人深夜在线观看| 精品国产免费久久| 日本午夜一本久久久综合| 在线观看国产精品网站| 最好看的中文字幕久久| 成人性生交大合| 国产人妖乱国产精品人妖| 狠狠网亚洲精品| 欧美大胆人体bbbb| 麻豆久久久久久| 欧美一区二区日韩| 日韩精品一二三| 欧美日韩一二三区| 五月综合激情婷婷六月色窝| 欧美中文字幕一区| 亚洲成人动漫精品| 777午夜精品免费视频| 无码av免费一区二区三区试看| 欧美少妇bbb| 午夜精品久久久久久久蜜桃app| 欧美性猛交xxxxxx富婆| 亚洲一区欧美一区| 欧美老人xxxx18| 日韩av一区二区三区四区| 日韩三级电影网址| 国产一区 二区| 国产精品欧美一区喷水| yourporn久久国产精品| 亚洲色图丝袜美腿| 欧美日韩一区高清| 另类中文字幕网| 国产视频一区二区三区在线观看| 国产毛片精品视频| 中文字幕日本不卡| 在线视频你懂得一区二区三区| 亚洲第一主播视频| 精品精品国产高清一毛片一天堂| 国产精品系列在线观看| 亚洲精品视频观看| 日韩午夜电影av| 懂色av一区二区三区免费观看| 中文字幕日本不卡| 制服.丝袜.亚洲.中文.综合| 国产一区二区毛片| 洋洋av久久久久久久一区| 91精品婷婷国产综合久久竹菊| 国内一区二区视频| 亚洲自拍偷拍图区| 久久久www免费人成精品| 色综合天天综合狠狠| 日本三级亚洲精品| 精品捆绑美女sm三区| 91蜜桃婷婷狠狠久久综合9色| 午夜精品久久久久久久蜜桃app| 久久久久久久久岛国免费| 91成人免费网站| 久久午夜电影网| 日韩一区二区不卡| 风间由美一区二区av101 | 中文字幕色av一区二区三区| 欧美美女bb生活片| 91免费观看视频在线| 男人的j进女人的j一区| 中文字幕一区不卡| 精品国产凹凸成av人导航| 日本道精品一区二区三区 | 成人福利视频网站| 美日韩一区二区| 亚洲精品欧美二区三区中文字幕| 精品国产一区二区在线观看| 欧美做爰猛烈大尺度电影无法无天| 狠狠色狠狠色综合日日91app| 伊人婷婷欧美激情| 国产精品三级av在线播放| 精品日韩一区二区三区免费视频| 欧美性色黄大片手机版| 成人动漫精品一区二区| 激情综合色综合久久综合| 国产高清不卡一区二区| 日韩福利视频导航| 亚洲综合在线电影| 亚洲欧美精品午睡沙发| 国产亚洲精品aa| 久久久99精品免费观看| 精品久久久久久久久久久久久久久| 欧美在线观看你懂的| 色综合天天综合给合国产| 成人h精品动漫一区二区三区| 国产麻豆精品一区二区| 美国毛片一区二区| 麻豆成人91精品二区三区| 日本不卡一二三区黄网| 亚洲线精品一区二区三区八戒| 亚洲欧美激情在线| 亚洲视频精选在线| 亚洲三级视频在线观看| 亚洲男人都懂的| 亚洲午夜在线电影| 亚洲va天堂va国产va久| 亚洲电影你懂得| 日韩精品亚洲专区| 蜜桃视频一区二区三区| 精品写真视频在线观看| 狠狠色综合播放一区二区| 国产精品99久久久久久宅男| 国产jizzjizz一区二区| 99综合电影在线视频| 91麻豆精品一区二区三区| 在线观看欧美黄色| 欧美一区二区三区啪啪| 国产亚洲精品中文字幕| 国产精品女同互慰在线看| 一区二区三区在线视频观看58| 亚洲一区二区视频在线观看| 亚洲第一综合色| 国内精品伊人久久久久av一坑 | 91精品国产一区二区三区| 欧美一区二区福利在线| 国产三级精品三级| 一区二区三区在线免费播放| 天天影视涩香欲综合网| 久久99久久精品| 色综合咪咪久久| 日韩欧美国产精品一区| 综合色中文字幕| 日韩国产一二三区| 成年人网站91| 3d动漫精品啪啪一区二区竹菊| 国产午夜三级一区二区三| 亚洲美女偷拍久久| 麻豆精品国产91久久久久久| 成人永久免费视频| 91精品久久久久久久91蜜桃| wwwwxxxxx欧美| 亚洲国产精品天堂| 福利一区二区在线| 日韩一区二区在线看| 亚洲人快播电影网| 国产在线播放一区三区四| 欧美优质美女网站| 国产精品女人毛片| 精品在线亚洲视频|