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

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

?? id3inducer.java

?? 用JAVA實現的C4.5算法
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
               if (mutualInfoAboveMean || !foundScoreAboveMean) {
//                  MLJ.ASSERT(meanMutualInfo != Globals.UNDEFINED_REAL);
                  logOptions.LOG(3, ", and that "+split.score()+" > "+meanMutualInfo+'\n');
                  double score = split.score();
                  logOptions.LOG(3,"Testing attribute "+attrNum+" ("+schema.attr_name(attrNum)+"): "+'\n');
//                  logOptions.LOG(3,split);
//                  logOptions.LOG(3,"Comparing score ("+score+") against max score + eps ("+
//                     (maxScore+MLJ.realEpsilon())+")"+'\n');
                  if (score > maxScore + MLJ.realEpsilon ||
                     (!foundScoreAboveMean && mutualInfoAboveMean)) {
                     logOptions.LOG(2,"Chose attribute "+attrNum+'\n');
                     maxScore = score;
                     bestSplit[0] = split;
                     logOptions.LOG(3,"max score becomes "+maxScore+'\n');
                  }
                  if (mutualInfoAboveMean)
                     foundScoreAboveMean = true;
               } else{
                  logOptions.LOG(3,"...not above mean"+'\n');
               }
            }
         }
      }
   }

   /** Checks if all attributes are multi-valued. An attribute is multivalued if
    * an instance can have more than one value at one time. If the attribute
    * contains values that are neither real or nominal, an abort message is issued.
    * @return False if the values are real numbers or if the nominal values are
    * not multivalued. Otherwise True is returned.
    */
   public boolean all_attributes_multi_val() 
   {
      boolean multiVal = true;
      Schema schema = TS.get_schema();
      for (int attrNum = 0; attrNum < schema.num_attr() && multiVal; attrNum++){
         if (schema.attr_info(attrNum).can_cast_to_real())
            multiVal = false;
         else if (schema.attr_info(attrNum).can_cast_to_nominal())
            multiVal = multi_val_attribute(attrNum);
               else
                  MLJ.Abort();
      }
      return multiVal;
   }
   /** Compute the split information for a given attribute.
    * @param attrNum The index number of this attribute column.
    * @param split The attribute to be split on.
    */
   public void split_info(int attrNum, SplitAttr split)
   {
      split_info(attrNum, split, null);
   }

   /** Compute the split information for a given attribute.
    * @param attrNum     The index number of this attribute column.
    * @param split       The attribute to be split on.
    * @param realColumns The columns of values specified for each attribute over
    * all instances in a data set.
    */
   public void split_info(int attrNum, SplitAttr split,
		   RealAndLabelColumn[] realColumns) 
   {
      Schema schema = TS.get_schema();

      if (attrNum < 0 || attrNum > schema.num_attr())
         Error.fatalErr("ID3Inducer::split_info: attrNum " + attrNum +
            " not in range 0 to " + schema.num_attr());
   
      logOptions.LOG(2,"Testing attribute "+attrNum+" ("+TS.get_schema().attr_name(attrNum)+"): ");

   // split needs to know if the Minimum Description Length Adjustment
   //   for continuous attributes needs to be applied.
      split.set_penalize_by_mdl(get_cont_mdl_adjust());
      double minSplit = Entropy.min_split(instance_list(),
			     get_lower_bound_min_split_weight(),
			     get_upper_bound_min_split_weight(),
			     get_min_split_weight_percent());
      double nominalMinSplit = minSplit;
      if (get_nominal_lbound_only()) {
         nominalMinSplit = get_lower_bound_min_split_weight();
         if (nominalMinSplit < 1)
            Error.fatalErr("split_info:  lowerBoundMinSplit (" +
               nominalMinSplit+") must be at least one");
      }
      logOptions.LOG(4,"Min split: "+(int)minSplit+", nominal min split: "+(int)nominalMinSplit+'\n');

   // If the attribute is nominal and has more than one value, then use
   //   mutual_info or gain_ratio to determine the information gained by
   //   splitting on it.
      if (schema.attr_info(attrNum).can_cast_to_nominal()) {
         split.set_split_score_criterion(get_split_score_criterion());
         if (SplitAttr.ok_to_split(attrNum, TS.counters(), nominalMinSplit)) {
            split.make_nominal_split(instance_list(), attrNum);
            logOptions.LOG(2,"Criterion score for attribute "+attrNum+" is "+split.score()+'\n');
	 MLJ.ASSERT(split.score() >= 0, "ID3Inducer::split_info(): split.score() >= 0");
         }
      }
   // Otherwise the attribute should be real and real_mutual_info is used
   //   to determine the threshold which gives the maximum information
   //   gain when split on.
      else if (schema.attr_info(attrNum).can_cast_to_real()) {
      // Find the best threshold (in find_best_threshold(), invoked through
      //   make_real_split()) based on the default split criterion; then
      //   set the criterion back.
      // @@ This will be an option for reals.
         if (realColumns == null)
            Error.fatalErr("ID3Inducer::split_info: can't split on real attribute "+
               schema.attr_name(attrNum)+" -- realColumns is null");
         RealAndLabelColumn column = realColumns[attrNum];
         if (column == null)
            Error.fatalErr("ID3Inducer::split_info: can't split on real attribute "+
               schema.attr_name(attrNum)+" -- the given column is null");
         column.sort();

         split.set_split_score_criterion(SplitScore.defaultSplitScoreCriterion);
         split.set_penalize_by_mdl(false);
         split.make_real_split(column, attrNum, minSplit,
            get_smooth_inst(), get_smooth_factor());
         split.set_split_score_criterion(get_split_score_criterion());
         split.set_penalize_by_mdl(get_cont_mdl_adjust());
         if (split.exist_split()) {
            logOptions.LOG(2,"Threshold: "+split.threshold()+", criterion score: "+
               split.score()+", entropy: "+split.get_entropy()+'\n');
            MLJ.ASSERT(split.score() >= 0, "ID3Inducer::split_info(): split.score() >= 0");
         }
      } else
         MLJ.Abort();
      
      if (split.split_type() == SplitAttr.noReasonableSplit)
      	logOptions.LOG(2,"No reasonable split"+'\n');
   }

//   public void set_unknown_edges(){ }

//   public void display_struct(){ }

//Additions by JL

//   private NO_DEFAULT_OPS(ID3Inducer);

   /** Create an Inducer for recursive calls. Since TDDTInducer is an abstract
    * class, it can't do the recursive call.
    * @param descr   The description of the new subinducer.
    * @param aCgraph A previously defined Cgraph for the inducer.
    * @return The new sub-ID3Inducer created.
    */
   public TDDTInducer create_subinducer(String descr, CGraph aCgraph) 
   {
      ID3Inducer inducer = new ID3Inducer(descr, aCgraph);
      inducer.copy_options(this);
      inducer.set_level(get_level() + 1);
      return inducer;
   }

   /** Build categorizer for the given attribute. The specified SplitAttr is
    * assumed to be valid.
    * @param split    The attribute to be split on.
    * @param catNames The category names that an instance may be categorized
    * under.
    * @return The NodeCategorizer containing a categorizer that splits on this
    * attribute.
    */
   public NodeCategorizer split_to_cat(SplitAttr split,
					 LinkedList catNames) 
   {
      int attrNum = split.get_attr_num();
      Schema schema = TS.get_schema();

//   MLJ.ASSERT(split.split_type() != SplitAttr::noReasonableSplit);
//   MLJ.ASSERT(attrNum >= 0);
//   MLJ.ASSERT(split.score() >= 0);
   
   // Else, build the categorizer
      String attrName = schema.attr_info(attrNum).name();
      if (get_debug()) {
         attrName = attrName+" (#=" + TS.num_instances()+
            "\\nENT="+ split.get_entropy()+
            "\\nMI=" + split.get_mutual_info(false, false)+
            "\\nGAIN=" + split.get_gain_ratio(false);
         if (split.get_penalize_by_mdl())
            attrName =attrName+"\\nMDL penalty=" + split.penalty();
         attrName =attrName+"\\nSCORE=" + split.score() + ")";
      }

      if (schema.attr_info(attrNum).can_cast_to_nominal()) {
//         MLJ.ASSERT(split.split_type() == SplitAttr::nominalSplit);
         NominalAttrInfo nai = schema.attr_info(attrNum).cast_to_nominal();
         int size = nai.num_values() + 1; // +1 for unknown
//         catNames = new String[size];//(Globals.UNKNOWN_CATEGORY_VAL, size);
         catNames.add(Globals.UNKNOWN_CATEGORY_VAL,"?");
         int cat = Globals.FIRST_CATEGORY_VAL;
         for (int i = 1; i < size; i++, cat++)
            catNames.add(cat,nai.get_value(i));

//UNKNOWN_NOMINAL_VAL is now 0 instead of -1. As a result, the 
//original input value for get_value would have been out of bounds 
//for the number of values. - JL
//            catNames.add(cat,nai.get_value(i + Globals.UNKNOWN_NOMINAL_VAL));
      
         return new AttrCategorizer(schema, attrNum, attrName);
      }
      else if (schema.attr_info(attrNum).can_cast_to_real()) {
         if (split.split_type() == SplitAttr.realThresholdSplit) {
            logOptions.LOG(5, split.threshold()+""+'\n');	 
            ThresholdCategorizer cat = new
            ThresholdCategorizer(schema, attrNum, split.threshold(),
               attrName);
		String[] categories = cat.real_edge_strings();
            for(int z = 0; z < categories.length; z++)
			catNames.add(z,categories[z]);
            return cat;
         } else {
            Error.fatalErr("ID3Inducer::split_to_cat: bad split type for "+
               "continuous attribute "+attrNum);
            return null;
         }
      } else {
         Error.fatalErr("ID3Inducer::split_to_cat: unrecognized attribute type"+
            " for attribute "+attrNum);
         return null;
      }
   }

   /** Returns the reference to the copy of ID3Inducer with the same settings.
    * @return A reference to an ID3Inducer.
    */
   public Inducer copy() 
   {
      Inducer ind = new ID3Inducer(this);
      return ind;
   }

   /** Returns the class id of this of this inducer.
    * @deprecated This method should be replaced with Java's instanceof operator.
    * @return Integer assigned to this inducer.
    */
   public int class_id(){ return ID3_INDUCER; }

}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产成人午夜精品5599| 欧美成人一区二区三区片免费 | www.欧美日韩| 国产大片一区二区| 国产成人精品免费视频网站| 韩国女主播一区| 国产精品资源站在线| 国产一区二区三区不卡在线观看| 久色婷婷小香蕉久久| 毛片一区二区三区| 麻豆国产一区二区| 国内精品嫩模私拍在线| 国产一区二区女| 国产 欧美在线| 成人ar影院免费观看视频| 91免费视频大全| 欧美专区在线观看一区| 91精品中文字幕一区二区三区| 69精品人人人人| 精品日韩一区二区| 国产亚洲综合av| 中文字幕日韩欧美一区二区三区| 成人免费在线播放视频| 一区二区三区在线视频免费观看| 亚洲一级二级在线| 日韩极品在线观看| 国产在线精品一区二区不卡了| 成人综合在线观看| 欧美怡红院视频| 亚洲精品一区二区三区影院| 欧美国产禁国产网站cc| 亚洲激情欧美激情| 青青草成人在线观看| 国产高清在线精品| 色噜噜夜夜夜综合网| 91精品国产免费久久综合| 亚洲精品一区在线观看| 亚洲女同ⅹxx女同tv| 亚洲成a人v欧美综合天堂| 韩国毛片一区二区三区| 91浏览器在线视频| 日韩美女一区二区三区四区| 欧美国产一区在线| 午夜视频在线观看一区二区| 国产在线精品一区二区夜色 | 欧美精品久久99久久在免费线| 日韩一区二区三区免费看 | 国产精品不卡一区| 偷拍自拍另类欧美| 豆国产96在线|亚洲| 欧美日韩中字一区| 国产夜色精品一区二区av| 亚洲国产精品尤物yw在线观看| 国产精品一二三四五| 欧美这里有精品| 国产欧美一区二区精品性| 亚洲国产视频在线| 成人高清免费观看| 日韩免费成人网| 亚洲观看高清完整版在线观看 | 久久久久久亚洲综合影院红桃| 亚洲欧美日韩一区二区| 久久电影网电视剧免费观看| 色乱码一区二区三区88| 久久久久久夜精品精品免费| 亚洲bt欧美bt精品777| 成人高清视频在线观看| 日韩免费高清av| 夜夜操天天操亚洲| 成人免费视频视频| 精品免费视频一区二区| 丝袜脚交一区二区| 一本大道av伊人久久综合| 国产午夜精品理论片a级大结局| 亚洲va欧美va人人爽午夜| 成人av午夜影院| 久久一日本道色综合| 天堂蜜桃91精品| 欧美又粗又大又爽| 中文字幕人成不卡一区| 国产suv精品一区二区6| 2021久久国产精品不只是精品| 日韩专区欧美专区| 欧美亚洲动漫制服丝袜| 亚洲欧美另类在线| 成人av影视在线观看| 国产亚洲欧美色| 国产呦精品一区二区三区网站| 日韩三级电影网址| 三级一区在线视频先锋| 欧美偷拍一区二区| 亚洲综合清纯丝袜自拍| 91免费国产视频网站| 中文字幕亚洲视频| 91原创在线视频| 中文字幕一区二区三区四区不卡| 国产盗摄一区二区三区| 国产日韩精品一区| 高清久久久久久| 国产欧美一区二区精品久导航| 国产在线视频一区二区三区| 26uuu精品一区二区三区四区在线 26uuu精品一区二区在线观看 | 欧美变态tickle挠乳网站| 日本视频一区二区| 日韩三级免费观看| 国内外成人在线| 国产日韩欧美精品综合| 成人免费毛片aaaaa**| 日本一区二区三区四区| av中文一区二区三区| 国产精品情趣视频| 97久久久精品综合88久久| 综合中文字幕亚洲| 日本黄色一区二区| 亚洲在线观看免费视频| 欧美裸体bbwbbwbbw| 蜜乳av一区二区| 久久亚区不卡日本| 不卡的看片网站| 一区二区三区产品免费精品久久75| 在线观看欧美黄色| 日本不卡一二三| 日本一区免费视频| 色婷婷久久一区二区三区麻豆| 亚洲综合久久久| 日韩一区二区三区免费看 | 成人av资源网站| 亚洲综合男人的天堂| 欧美一级精品大片| 国产一区二区三区不卡在线观看| 国产精品丝袜黑色高跟| 日本高清无吗v一区| 视频一区国产视频| 国产亚洲欧美日韩在线一区| 91性感美女视频| 天天av天天翘天天综合网| 久久综合久久综合亚洲| 99久久婷婷国产综合精品电影 | 国产精品一区二区在线看| 中文字幕在线一区| 欧美三级电影在线看| 国产一区欧美二区| 亚洲综合成人网| 久久综合狠狠综合久久综合88 | 91网上在线视频| 日本va欧美va欧美va精品| 国产色综合久久| 欧美在线观看一二区| 久久99九九99精品| 亚洲视频在线一区| 精品少妇一区二区| 色婷婷亚洲一区二区三区| 久久 天天综合| 一区二区三区在线观看欧美| 欧美成人官网二区| 色国产精品一区在线观看| 久久国产精品免费| 亚洲视频电影在线| 精品国产一区二区三区忘忧草| 91网站最新地址| 激情综合网最新| 一二三区精品福利视频| 久久精品人人做| 欧美久久久一区| 97超碰欧美中文字幕| 国产精品影视在线观看| 亚洲成人手机在线| 国产精品女主播在线观看| 日韩一区二区视频在线观看| 色婷婷久久久久swag精品| 国产精品自拍毛片| 日韩av在线免费观看不卡| 亚洲素人一区二区| 久久久久青草大香线综合精品| 欧美美女直播网站| 色综合中文字幕| 国产福利91精品| 精品中文字幕一区二区小辣椒| 亚洲影视在线播放| 亚洲欧洲国产专区| 久久久国产精华| 日韩欧美你懂的| 6080午夜不卡| 欧美综合色免费| 日本大香伊一区二区三区| 成人看片黄a免费看在线| 精品一区二区免费| 日本不卡不码高清免费观看| 亚洲午夜精品网| 亚洲一区二区三区四区的| 国产精品成人在线观看| 国产欧美日韩三区| 久久久亚洲国产美女国产盗摄| 日韩免费在线观看| 欧美一级欧美一级在线播放| 欧美日韩国产另类不卡| 欧美揉bbbbb揉bbbbb| 欧美最猛黑人xxxxx猛交| 欧美性猛片aaaaaaa做受| 91久久免费观看|