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

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

?? id3inducer.java

?? 自己編的ID3算法很小但效果很好
?? 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一区二区三区免费野_久草精品视频
麻豆91在线看| 日韩电影在线一区二区三区| 日韩电影一区二区三区四区| 欧美三区在线观看| 亚洲高清久久久| 欧美色欧美亚洲另类二区| 亚洲专区一二三| 欧美在线影院一区二区| 亚洲va韩国va欧美va| 91精品国产免费| 国产一区欧美日韩| 亚洲欧洲日产国码二区| 色综合视频在线观看| 亚洲一区二区在线观看视频 | 欧美日韩国产欧美日美国产精品| 国产精品视频一区二区三区不卡| 懂色av一区二区三区蜜臀| 亚洲三级在线播放| 91超碰这里只有精品国产| 亚洲国产精品一区二区尤物区| 在线综合视频播放| 国产精品99久久久| 亚洲综合免费观看高清完整版| 欧美一区二区三区精品| 成人污视频在线观看| 亚洲午夜精品在线| 久久久久久久综合日本| 日本道色综合久久| 91激情在线视频| 国产日韩精品一区| 欧美日韩免费在线视频| 国产主播一区二区三区| 亚洲精品ww久久久久久p站| 日韩一级片在线播放| 成人av中文字幕| 日本欧美一区二区在线观看| 国产精品丝袜黑色高跟| 欧美一区二区三区四区五区| 成人黄色在线视频| 蜜臀av一区二区在线观看| 99视频精品全部免费在线| 亚洲自拍都市欧美小说| 久久久天堂av| 欧美妇女性影城| 97精品电影院| 久久不见久久见免费视频1| 亚洲欧美日韩国产综合| 国产调教视频一区| 日韩一区二区免费高清| 欧美性一区二区| 成人av在线播放网址| 久国产精品韩国三级视频| 亚洲图片激情小说| 91在线国内视频| 国产一区欧美二区| 蜜臀va亚洲va欧美va天堂| 一区二区三区国产精品| 亚洲欧美综合色| 亚洲国产精品ⅴa在线观看| 精品免费国产一区二区三区四区| 91黄色激情网站| 99久久精品免费看| 国产91高潮流白浆在线麻豆 | 精品午夜一区二区三区在线观看| 一区二区在线观看视频| 国产精品三级久久久久三级| 精品av久久707| 欧美日韩在线播| 在线观看一区不卡| 91麻豆福利精品推荐| av在线一区二区三区| 国产成a人亚洲| 国产成人久久精品77777最新版本 国产成人鲁色资源国产91色综 | 亚洲国产日韩a在线播放性色| 久久色在线视频| 精品免费一区二区三区| 久久综合色婷婷| 欧美本精品男人aⅴ天堂| 日韩一区二区麻豆国产| 日韩欧美成人一区二区| 欧美电视剧免费观看| 日韩欧美视频在线| 91麻豆精品国产91久久久使用方法 | 亚洲最新视频在线观看| 亚洲色图视频网站| 亚洲青青青在线视频| 亚洲麻豆国产自偷在线| 亚洲欧美日韩精品久久久久| 又紧又大又爽精品一区二区| 亚洲资源中文字幕| 石原莉奈在线亚洲三区| 久久国产福利国产秒拍| 国产在线精品一区二区不卡了| 国内精品写真在线观看| 成人一二三区视频| 色综合久久久久久久| 欧美视频自拍偷拍| 精品免费国产二区三区| 中文字幕不卡的av| 一区二区在线观看免费| 青青草原综合久久大伊人精品| 国产最新精品精品你懂的| 成人影视亚洲图片在线| 91美女片黄在线| 这里只有精品99re| 国产欧美精品一区二区色综合朱莉| 国产精品美女www爽爽爽| 亚洲香肠在线观看| 蜜臀久久99精品久久久久久9| 国产激情一区二区三区四区| 99国产精品久久| 91精品国模一区二区三区| 国产亚洲欧美日韩日本| 一区二区欧美在线观看| 久久超级碰视频| 色综合久久久久综合体桃花网| 91精品久久久久久久久99蜜臂| 国产精品情趣视频| 亚洲精品美国一| 日本不卡一二三| www.亚洲色图| 91精品国产欧美一区二区| 亚洲视频一区在线观看| 日本免费在线视频不卡一不卡二| 成人一区二区三区在线观看| 在线看国产一区二区| 久久精品欧美一区二区三区不卡| 一区二区三区美女视频| 国产精品一二三在| 欧美日韩成人高清| 欧美国产亚洲另类动漫| 精品一区二区三区在线观看| 成人黄色小视频在线观看| 欧美老女人第四色| 国产精品乱码人人做人人爱| 亚洲成人免费av| av在线免费不卡| 精品国产成人在线影院| 亚洲国产精品视频| 99久久亚洲一区二区三区青草| 欧美精选午夜久久久乱码6080| 国产精品系列在线| 精品在线一区二区| 欧美精品在线观看播放| 亚洲天堂网中文字| 国产一区 二区| 欧美精品久久99久久在免费线| 欧美日韩精品一区二区三区四区| 日本一区二区三区电影| 久久精品国产网站| 555www色欧美视频| 亚洲色图视频网| 成人激情图片网| 久久久久久免费毛片精品| 麻豆精品一区二区av白丝在线| 精品国产乱码久久久久久闺蜜 | 制服丝袜激情欧洲亚洲| 国产精品精品国产色婷婷| 久久精品国产免费| 欧美xxxxx裸体时装秀| 偷窥少妇高潮呻吟av久久免费| 色婷婷一区二区三区四区| 一区在线播放视频| proumb性欧美在线观看| 国产精品嫩草影院com| 成人精品免费网站| 国产精品嫩草99a| www.欧美亚洲| 国产精品久久久久久久久晋中| 国产成人h网站| 国产精品你懂的在线| 99久久伊人精品| 国产精品久久久久久久久免费樱桃| 成人动漫av在线| 亚洲色图在线视频| 欧美日精品一区视频| 日韩经典中文字幕一区| 日韩免费电影网站| 国产老女人精品毛片久久| 国产亚洲欧美日韩日本| 成人激情电影免费在线观看| 中文字幕日本不卡| 色综合天天天天做夜夜夜夜做| 亚洲免费在线电影| 欧美经典一区二区三区| 久久综合成人精品亚洲另类欧美 | 国产福利视频一区二区三区| 久久久久久97三级| 成人免费黄色大片| 亚洲日本va午夜在线影院| 欧美性受xxxx黑人xyx性爽| 亚洲国产综合人成综合网站| 欧美日韩中文一区| 久草这里只有精品视频| 国产精品全国免费观看高清 | 国产成人精品一区二区三区四区 | 欧美日韩一区二区三区四区| 日韩电影一区二区三区| 精品日韩欧美一区二区| 成人免费高清在线观看|