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

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

?? tddtinducer.java

?? java數據挖掘算法
?? 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一区二区| 91色在线porny| 一本久久综合亚洲鲁鲁五月天 | 白白色亚洲国产精品| av在线不卡观看免费观看| 色视频成人在线观看免| 欧美人成免费网站| 欧美videos大乳护士334| 国产精品每日更新| 亚洲国产精品一区二区www | 91精品国产综合久久香蕉的特点 | 三级在线观看一区二区| 国产激情视频一区二区在线观看 | 日本不卡视频一二三区| 91啦中文在线观看| 精品国产成人在线影院| 亚洲成av人片在线观看| 国产91精品入口| 亚洲精品在线电影| 日韩av不卡一区二区| 99久久精品免费精品国产| 精品国产网站在线观看| 午夜精品久久久久久久久久久 | 欧美精品一级二级三级| 亚洲精品乱码久久久久久黑人 | 18成人在线观看| 丁香激情综合五月| 中文字幕av资源一区| 国产一区二区精品久久| 国产成人在线视频网站| 成人av在线播放网站| 亚洲欧美一区二区三区久本道91| 欧美视频在线播放| 综合电影一区二区三区| 久久激情五月激情| 日韩一级片网址| 五月婷婷色综合| 丰满少妇久久久久久久| 日韩女优电影在线观看| 亚洲在线观看免费| 91在线观看高清| 亚洲欧美日韩一区二区三区在线观看| 国产成人啪午夜精品网站男同| 国产免费成人在线视频| 97精品久久久久中文字幕| 一区二区三区久久| 欧美精品久久一区二区三区| 久久99最新地址| 中文字幕在线观看不卡| 欧美三级韩国三级日本一级| 爽好久久久欧美精品| 国产精品美女久久福利网站| 欧美人妖巨大在线| 国产麻豆欧美日韩一区| 午夜视频一区二区三区| 亚洲成av人**亚洲成av**| 中文字幕字幕中文在线中不卡视频| 91精品国产综合久久久久| 91福利国产成人精品照片| 国产精品99久久久久久似苏梦涵 | 日韩高清不卡一区二区| 最好看的中文字幕久久| 久久久国产精品麻豆| 欧美日韩免费电影| 91小视频在线| 成人h版在线观看| 国产福利一区二区三区在线视频| 美女视频黄频大全不卡视频在线播放| 自拍偷拍亚洲综合| 中文字幕亚洲区| 中文字幕欧美一| 亚洲欧美中日韩| 亚洲欧美成人一区二区三区| 欧美国产乱子伦 | 欧美日韩一级黄| 欧美日精品一区视频| 欧美日韩在线播放| 欧美精品自拍偷拍| 日韩精品专区在线影院重磅| 欧美日韩在线精品一区二区三区激情| 欧美主播一区二区三区美女| 在线亚洲免费视频| 欧美一区二区三区性视频| 日韩视频不卡中文| 国产精品毛片高清在线完整版 | 91丝袜呻吟高潮美腿白嫩在线观看| 粉嫩在线一区二区三区视频| 91在线云播放| 538在线一区二区精品国产| 精品国产乱码久久久久久蜜臀 | 国产一区二区中文字幕| 99热国产精品| 精品99999| 亚洲美女偷拍久久| 青青草国产精品97视觉盛宴| 春色校园综合激情亚洲| 欧美日韩黄视频| 国产精品久久久久9999吃药| 人人超碰91尤物精品国产| 国产伦理精品不卡| 在线成人高清不卡| 亚洲蜜桃精久久久久久久| 国产乱人伦偷精品视频不卡| 欧美久久一二三四区| 中文字幕中文字幕一区二区| 青青草国产精品97视觉盛宴| 在线日韩国产精品| 中文字幕一区二区三区精华液| 裸体在线国模精品偷拍| 欧美日韩日本视频| 一区二区在线观看视频| 99久久亚洲一区二区三区青草 | 国模娜娜一区二区三区| 91精品国产综合久久精品图片 | 欧美日韩精品免费观看视频 | 国内精品在线播放| 日本一区二区免费在线观看视频| 不卡影院免费观看| 亚洲三级在线免费观看| 色婷婷香蕉在线一区二区| 亚洲国产另类精品专区| 欧美性做爰猛烈叫床潮| 亚洲国产精品麻豆| 欧美日韩一区二区三区免费看| 一区二区三区精品在线观看| 精品视频一区二区三区免费| 日韩精品一级中文字幕精品视频免费观看 | 亚洲一区二三区| 91官网在线免费观看| 日日欢夜夜爽一区| 欧美一区二区三区男人的天堂| 亚洲一二三四在线观看| 精品国产一区久久| 91视频你懂的| 亚洲高清在线精品| 精品国产一区二区精华| jvid福利写真一区二区三区| 日本视频在线一区| 国产三级精品三级在线专区| 欧美日韩www| 91同城在线观看| 成人国产免费视频| 国产成人精品综合在线观看| 久久精品久久精品| 香蕉成人啪国产精品视频综合网| 久久久三级国产网站| aaa欧美大片| 免费在线欧美视频| 亚洲精品久久7777| 国产亚洲精品中文字幕| 色诱视频网站一区| 国产精品1区二区.| 婷婷六月综合亚洲| 亚洲免费在线视频| 在线播放一区二区三区| 成人a级免费电影| 国产精品综合久久| 免费美女久久99| 天堂蜜桃一区二区三区| 夜夜操天天操亚洲| 亚洲天堂久久久久久久| 国产三级精品三级| 久久久久久电影| 久久九九久精品国产免费直播| 日韩视频一区二区| 欧美成人午夜电影| 欧美tickling网站挠脚心| 亚洲日本va在线观看| 国产精品第四页| 日韩美女啊v在线免费观看| 国产精品丝袜91| 国产欧美一区二区精品性| 国产三区在线成人av| 久久午夜色播影院免费高清| 日韩三级免费观看| 欧美va天堂va视频va在线| 2023国产精品自拍| 欧美大片国产精品| 久久久久国产精品麻豆ai换脸| 国产欧美一区二区精品性色| 国产女同性恋一区二区| 中文字幕一区二区三区精华液| 亚洲美女偷拍久久| 蜜臀精品久久久久久蜜臀| 国产成人欧美日韩在线电影| 99视频精品免费视频| 3atv一区二区三区| 久久免费视频色| 亚洲欧美一区二区三区国产精品| 亚洲国产另类av| 国产成人高清视频| 欧美日韩成人高清| 国产精品激情偷乱一区二区∴| 亚洲自拍偷拍九九九| 国产精品自拍av| 精品视频在线免费观看| 中文天堂在线一区| 精品一区二区三区免费播放|