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

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

?? tddtinducer.java

?? 數據倉庫挖掘與開發 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一区二区三区免费野_久草精品视频
欧美精选一区二区| 色综合天天综合给合国产| 亚洲影视在线播放| 亚洲自拍偷拍综合| 亚洲国产日韩在线一区模特| 亚洲国产视频网站| 美女诱惑一区二区| 国产一区二区导航在线播放| 国产成人精品亚洲午夜麻豆| 成人免费看片app下载| 色一情一乱一乱一91av| 97超碰欧美中文字幕| 欧美性极品少妇| 欧美精选一区二区| 久久九九久精品国产免费直播| 日本一区二区免费在线观看视频 | 欧美撒尿777hd撒尿| 欧美影院午夜播放| 精品国产免费一区二区三区香蕉| 久久综合久久综合久久综合| 国产精品久久毛片| 香蕉久久夜色精品国产使用方法| 蜜臀久久99精品久久久久宅男 | 亚洲va在线va天堂| 麻豆91小视频| 91欧美激情一区二区三区成人| 欧美性色综合网| 日韩精品一区二区三区视频在线观看 | av在线一区二区三区| 91九色02白丝porn| 日韩欧美一二三区| 一区二区三区在线视频观看 | 91高清在线观看| 日韩欧美的一区| 亚洲三级久久久| 国产一区在线视频| 欧美性大战久久久| 国产欧美一区在线| 毛片不卡一区二区| 在线观看亚洲专区| 欧美国产成人精品| 久久99这里只有精品| 欧美怡红院视频| 国产精品欧美久久久久无广告 | 狠狠久久亚洲欧美| 欧美视频一区二区| 欧美国产亚洲另类动漫| 美女视频黄频大全不卡视频在线播放| 波多野结衣一区二区三区| 欧美一级在线视频| 亚洲综合成人网| 97se狠狠狠综合亚洲狠狠| 精品91自产拍在线观看一区| 午夜欧美电影在线观看| 99视频在线精品| 久久精品亚洲精品国产欧美kt∨ | 欧美午夜精品一区二区蜜桃| 国产精品久久毛片av大全日韩| 精品一区二区在线视频| 欧美久久久影院| 夜夜爽夜夜爽精品视频| aaa亚洲精品| 国产欧美日韩中文久久| 国产九色精品成人porny | 亚洲精品视频免费看| 成人av网站大全| 国产精品免费观看视频| 成人精品免费视频| 国产精品天美传媒| 成人免费毛片app| 国产精品欧美综合在线| a美女胸又www黄视频久久| 国产日韩欧美在线一区| 国产激情91久久精品导航| 久久精品夜夜夜夜久久| 福利电影一区二区三区| 国产精品初高中害羞小美女文| 成人性色生活片| 亚洲色图都市小说| 欧美日韩一级片网站| 亚洲成av人片在线观看无码| 67194成人在线观看| 青青草一区二区三区| 欧美成人精品福利| 懂色中文一区二区在线播放| 中文字幕中文乱码欧美一区二区 | 亚洲一区二区三区视频在线| 91影院在线观看| 亚洲黄色在线视频| 欧美性大战久久| 美女网站在线免费欧美精品| 久久久久久9999| 色吧成人激情小说| 日韩精品一二区| 久久精品一二三| 在线亚洲高清视频| 蜜臀av一级做a爰片久久| 精品福利一二区| av高清不卡在线| 五月婷婷综合激情| 久久久夜色精品亚洲| 97精品久久久午夜一区二区三区 | 日韩三级.com| 国产在线国偷精品产拍免费yy| 中文字幕精品一区二区精品绿巨人 | 色av一区二区| 日韩在线一区二区| 国产色产综合色产在线视频| 91香蕉国产在线观看软件| 日韩激情一二三区| 国产精品女主播在线观看| 欧美日韩一区二区三区不卡| 国产在线播精品第三| 亚洲一区二区精品久久av| 精品奇米国产一区二区三区| 成人免费高清视频在线观看| 日本亚洲免费观看| 亚洲日本一区二区三区| 日韩女优av电影| 欧美性一级生活| 高清在线成人网| 乱中年女人伦av一区二区| 亚洲精品视频在线看| 国产偷国产偷亚洲高清人白洁| 欧美丰满美乳xxx高潮www| av一区二区三区四区| 日本欧美肥老太交大片| 亚洲在线观看免费| 成人欧美一区二区三区黑人麻豆 | 欧美日韩免费一区二区三区| 成人国产精品免费观看动漫| 美女视频黄a大片欧美| 一区二区三区四区在线播放 | 免费成人小视频| 亚洲狠狠爱一区二区三区| 中文字幕av一区二区三区免费看 | 久久先锋资源网| 91精品国产日韩91久久久久久| 在线观看欧美黄色| 色美美综合视频| 99精品国产99久久久久久白柏| 国产不卡在线播放| 国产福利一区二区| 激情欧美一区二区| 久久99精品久久久久久国产越南| 天天影视色香欲综合网老头| 亚洲一区二区三区四区在线| 亚洲蜜桃精久久久久久久| 亚洲色图视频网站| 亚洲色图欧美偷拍| 亚洲一区二区四区蜜桃| 亚洲一区二区三区中文字幕| 亚洲一区在线免费观看| 性做久久久久久久免费看| 午夜天堂影视香蕉久久| 日韩精品福利网| 韩日欧美一区二区三区| 国产自产2019最新不卡| 国产精品99久久久久久似苏梦涵| 国产一区二区三区四区五区美女| 日韩免费高清电影| 国产一区二区三区不卡在线观看| 午夜欧美视频在线观看 | 欧美一区二区国产| 欧美一区二区在线视频| 亚洲精品在线观看网站| 国产女主播一区| 亚洲少妇30p| 日韩成人精品在线观看| 黄色资源网久久资源365| 懂色av中文一区二区三区| 色综合咪咪久久| 欧美一区二区三区喷汁尤物| 亚洲精品一区二区三区四区高清| 久久精品一区二区三区不卡牛牛 | 99精品视频在线播放观看| 在线观看一区二区精品视频| 91精品国产高清一区二区三区| 精品电影一区二区| 国产精品久久毛片av大全日韩| 亚洲国产精品久久人人爱| 中文字幕不卡一区| 国产日韩欧美综合一区| 亚洲品质自拍视频网站| 日韩中文字幕1| 东方欧美亚洲色图在线| 欧美日韩日日夜夜| 久久九九99视频| 天堂在线一区二区| 国产.精品.日韩.另类.中文.在线.播放 | 色成人在线视频| 精品国内片67194| 亚洲欧美偷拍三级| 精品一区二区三区视频在线观看| av午夜一区麻豆| 26uuu亚洲| 亚洲777理论| 色诱亚洲精品久久久久久| 久久久www免费人成精品| 亚洲一区二区欧美日韩|