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

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

?? ranker.java

?? 一個數據挖掘系統的源碼
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:

/**
 *   
 *   AgentAcademy - an open source Data Mining framework for
 *   training intelligent agents
 *
 *   Copyright (C)   2001-2003 AA Consortium.
 *
 *   This library is open source software; you can redistribute it 
 *   and/or modify it under the terms of the GNU Lesser General 
 *   Public License as published by the Free Software Foundation;   
 *   either version 2.0 of the License, or (at your option) any later 
 *   version.
 *
 *   This library is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the    
 *   GNU General Public License for more details.
 *
 *   You should have received a copy of the GNU Lesser General Public
 *   License along with this library; if not, write to the Free 
 *   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, 
 *   MA  02111-1307 USA
 * 
 */

package  org.agentacademy.modules.dataminer.attributeSelection;

import java.util.Enumeration;
import java.util.Vector;

import org.agentacademy.modules.dataminer.core.Instances;
import org.agentacademy.modules.dataminer.core.Option;
import org.agentacademy.modules.dataminer.core.OptionHandler;
import org.agentacademy.modules.dataminer.core.Range;
import org.agentacademy.modules.dataminer.core.Utils;

/** 
 * Class for ranking the attributes evaluated by a AttributeEvaluator
 *
 * Valid options are: <p>
 *
 * -P <start set> <br>
 * Specify a starting set of attributes. Eg 1,4,7-9. <p>
 *
 * -T <threshold> <br>
 * Specify a threshold by which the AttributeSelection module can. <br>
 * discard attributes. <p>
 *
 * @author Mark Hall (mhall@cs.waikato.ac.nz)
 * @version $Revision: 1.2 $
 */
public class Ranker extends ASSearch 
  implements RankedOutputSearch, StartSetHandler, OptionHandler {

  /** Holds the starting set as an array of attributes */
  private int[] m_starting;

  /** Holds the start set for the search as a range */
  private Range m_startRange;

  /** Holds the ordered list of attributes */
  private int[] m_attributeList;

  /** Holds the list of attribute merit scores */
  private double[] m_attributeMerit;

  /** Data has class attribute---if unsupervised evaluator then no class */
  private boolean m_hasClass;

  /** Class index of the data if supervised evaluator */
  private int m_classIndex;

  /** The number of attribtes */
  private int m_numAttribs;

  /** 
   * A threshold by which to discard attributes---used by the
   * AttributeSelection module
   */
  private double m_threshold;

  /** The number of attributes to select. -1 indicates that all attributes
      are to be retained. Has precedence over m_threshold */
  private int m_numToSelect = -1;

  /** Used to compute the number to select */
  private int m_calculatedNumToSelect = -1;

  /**
   * Returns a string describing this search method
   * @return a description of the search suitable for
   * displaying in the explorer/experimenter gui
   */
  public String globalInfo() {
    return "Ranker : \n\nRanks attributes by their individual evaluations. "
      +"Use in conjunction with attribute evaluators (ReliefF, GainRatio, "
      +"Entropy etc).\n";
  }

  /**
   * Constructor
   */
  public Ranker () {
    resetOptions();
  }

  /**
   * Returns the tip text for this property
   * @return tip text for this property suitable for
   * displaying in the explorer/experimenter gui
   */
  public String numToSelectTipText() {
    return "Specify the number of attributes to retain. The default value "
      +"(-1) indicates that all attributes are to be retained. Use either "
      +"this option or a threshold to reduce the attribute set.";
  }

  /**
   * Specify the number of attributes to select from the ranked list. -1
   * indicates that all attributes are to be retained.
   * @param n the number of attributes to retain
   */
  public void setNumToSelect(int n) {
    m_numToSelect = n;
  }

  /**
   * Gets the number of attributes to be retained.
   * @return the number of attributes to retain
   */
  public int getNumToSelect() {
    return m_numToSelect;
  }

  /**
   * Gets the calculated number to select. This might be computed
   * from a threshold, or if < 0 is set as the number to select then
   * it is set to the number of attributes in the (transformed) data.
   * @return the calculated number of attributes to select
   */
  public int getCalculatedNumToSelect() {
    if (m_numToSelect >= 0) {
      m_calculatedNumToSelect = m_numToSelect;
    }
    return m_calculatedNumToSelect;
  }

  /**
   * Returns the tip text for this property
   * @return tip text for this property suitable for
   * displaying in the explorer/experimenter gui
   */
  public String thresholdTipText() {
    return "Set threshold by which attributes can be discarded. Default value "
      + "results in no attributes being discarded. Use either this option or "
      +"numToSelect to reduce the attribute set.";
  }

  /**
   * Set the threshold by which the AttributeSelection module can discard
   * attributes.
   * @param threshold the threshold.
   */
  public void setThreshold(double threshold) {
    m_threshold = threshold;
  }

  /**
   * Returns the threshold so that the AttributeSelection module can
   * discard attributes from the ranking.
   */
  public double getThreshold() {
    return m_threshold;
  }
  
  /**
   * Returns the tip text for this property
   * @return tip text for this property suitable for
   * displaying in the explorer/experimenter gui
   */
  public String generateRankingTipText() {
    return "A constant option. Ranker is only capable of generating "
      +" attribute rankings.";
  }

  /**
   * This is a dummy set method---Ranker is ONLY capable of producing
   * a ranked list of attributes for attribute evaluators.
   * @param doRank this parameter is N/A and is ignored
   */
  public void setGenerateRanking(boolean doRank) {
    
  }

  /**
   * This is a dummy method. Ranker can ONLY be used with attribute
   * evaluators and as such can only produce a ranked list of attributes
   * @return true all the time.
   */
  public boolean getGenerateRanking() {
    return true;
  }

  /**
   * Returns the tip text for this property
   * @return tip text for this property suitable for
   * displaying in the explorer/experimenter gui
   */
  public String startSetTipText() {
    return "Specify a set of attributes to ignore. "
      +" When generating the ranking, Ranker will not evaluate the attributes "
      +" in this list. "
      +"This is specified as a comma " 
      +"seperated list off attribute indexes starting at 1. It can include "
      +"ranges. Eg. 1,2,5-9,17.";
  }

  /**
   * Sets a starting set of attributes for the search. It is the
   * search method's responsibility to report this start set (if any)
   * in its toString() method.
   * @param startSet a string containing a list of attributes (and or ranges),
   * eg. 1,2,6,10-15.
   * @exception Exception if start set can't be set.
   */
  public void setStartSet (String startSet) throws Exception {
    m_startRange.setRanges(startSet);
  }

  /**
   * Returns a list of attributes (and or attribute ranges) as a String
   * @return a list of attributes (and or attribute ranges)
   */
  public String getStartSet () {
    return m_startRange.getRanges();
  }

  /**
   * Returns an enumeration describing the available options.
   * @return an enumeration of all the available options.
   **/
  public Enumeration listOptions () {
    Vector newVector = new Vector(3);

    newVector
      .addElement(new Option("\tSpecify a starting set of attributes." 
			     + "\n\tEg. 1,3,5-7."
			     +"\t\nAny starting attributes specified are"
			     +"\t\nignored during the ranking."
			     ,"P",1
			     , "-P <start set>"));
    newVector
      .addElement(new Option("\tSpecify a theshold by which attributes" 
			     + "\tmay be discarded from the ranking.","T",1
			     , "-T <threshold>"));

    newVector
      .addElement(new Option("\tSpecify number of attributes to select" 
			     ,"N",1
			     , "-N <num to select>"));

    return newVector.elements();

  }
  
  /**
   * Parses a given list of options.
   *
   * Valid options are: <p>
   *
   * -P <start set> <br>
   * Specify a starting set of attributes. Eg 1,4,7-9. <p>
   *
   * -T <threshold> <br>
   * Specify a threshold by which the AttributeSelection module can <br>
   * discard attributes. <p>
   *
   * -N <number to retain> <br>
   * Specify the number of attributes to retain. Overides any threshold. <br>
   * <p>
   *
   * @param options the list of options as an array of strings
   * @exception Exception if an option is not supported
   *
   **/
  public void setOptions (String[] options)
    throws Exception
  {
    String optionString;
    resetOptions();

    optionString = Utils.getOption('P', options);
    if (optionString.length() != 0) {
      setStartSet(optionString);
    }

    optionString = Utils.getOption('T', options);
    if (optionString.length() != 0) {
      Double temp;
      temp = Double.valueOf(optionString);
      setThreshold(temp.doubleValue());
    }

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
丁香另类激情小说| 国产91高潮流白浆在线麻豆| 国产精品情趣视频| 精品精品欲导航| 精品剧情在线观看| 精品国产91亚洲一区二区三区婷婷| 欧美日韩美少妇| 日韩一区二区在线观看视频| 日韩无一区二区| 2020国产精品自拍| 国产亚洲福利社区一区| 亚洲精品免费在线观看| 亚洲男同性恋视频| 亚洲v中文字幕| 激情伊人五月天久久综合| 国产一区二区三区日韩| 国产精品99久久久| av不卡免费电影| 在线观看国产精品网站| 日韩一区二区不卡| 国产亲近乱来精品视频| 亚洲女女做受ⅹxx高潮| 日韩毛片一二三区| 五月婷婷综合激情| 日韩中文字幕亚洲一区二区va在线| 国产午夜精品福利| 国产精品成人免费精品自在线观看| 亚洲色图清纯唯美| 视频一区欧美精品| 国产真实乱对白精彩久久| 成人亚洲精品久久久久软件| 色视频一区二区| 精品欧美久久久| 亚洲色图视频网| 久久99久久久久久久久久久| 成人在线视频一区二区| 欧美日韩国产色站一区二区三区| 日韩欧美电影一二三| 成人欧美一区二区三区视频网页| 亚洲最大的成人av| 国产精品一区二区不卡| 国产欧美精品在线观看| 欧美国产精品一区| 婷婷成人激情在线网| 成人一级片网址| 日韩一级精品视频在线观看| 亚洲人吸女人奶水| 国产精品 日产精品 欧美精品| 日本高清视频一区二区| 久久久久久久一区| 日本一不卡视频| 色噜噜狠狠成人网p站| 久久久精品免费网站| 丝瓜av网站精品一区二区| 成人免费三级在线| 久久久久久久久久久久电影| 日一区二区三区| 在线看国产一区| 国产精品高潮久久久久无| 国产高清成人在线| 精品国产123| 美女国产一区二区三区| 欧美三级视频在线| 亚洲一区二区三区不卡国产欧美| 成人精品小蝌蚪| 久久精品亚洲国产奇米99| 国产成人综合视频| 亚洲综合一二三区| 亚洲人亚洲人成电影网站色| 国产永久精品大片wwwapp| 欧美剧情电影在线观看完整版免费励志电影| 国产亚洲欧美中文| 国产在线视视频有精品| 日韩精品一区二区三区在线播放| 丝袜美腿亚洲一区二区图片| 欧美性猛交xxxx黑人交| 亚洲国产视频在线| 欧美日韩精品欧美日韩精品| 亚洲电影在线免费观看| 欧美男生操女生| 亚洲va欧美va人人爽| 制服视频三区第一页精品| 午夜伊人狠狠久久| 9191久久久久久久久久久| 午夜久久久影院| 日韩一区二区麻豆国产| 国产又黄又大久久| 国产精品美女www爽爽爽| 99久久亚洲一区二区三区青草| 日韩毛片视频在线看| 在线观看日韩一区| 日产国产高清一区二区三区| 精品国产一二三| 成人美女视频在线观看| 亚洲精品写真福利| 日韩欧美区一区二| 成人蜜臀av电影| 亚洲成人动漫精品| xnxx国产精品| 在线观看视频一区二区欧美日韩| 日韩精品视频网站| 国产日韩一级二级三级| 色婷婷av一区| 狠狠色狠狠色综合日日91app| 欧美激情一区二区三区全黄| 色婷婷久久久久swag精品| 日韩在线观看一区二区| 国产欧美视频在线观看| 欧美日韩精品专区| 丁香啪啪综合成人亚洲小说| 亚洲国产视频在线| 日本一区二区在线不卡| 欧美美女网站色| 丁香亚洲综合激情啪啪综合| 亚洲成av人在线观看| 国产精品天干天干在观线| 欧美日韩dvd在线观看| 风间由美中文字幕在线看视频国产欧美| 亚洲精品你懂的| 国产欧美一区二区精品性色超碰 | 97久久超碰精品国产| 五月婷婷激情综合| 综合中文字幕亚洲| 久久综合色一综合色88| 欧美日韩专区在线| 99久久精品国产麻豆演员表| 麻豆91小视频| 亚洲国产视频在线| 综合色中文字幕| 国产欧美日韩一区二区三区在线观看| 欧美军同video69gay| 一本色道久久综合亚洲精品按摩| 国产精品一区三区| 久久99精品久久久久久国产越南 | 69久久夜色精品国产69蝌蚪网| 成人福利在线看| 国产成人综合在线| 精品亚洲aⅴ乱码一区二区三区| 亚洲一级二级在线| 一区二区三区欧美久久| 亚洲男人的天堂网| 亚洲国产经典视频| 欧美激情在线一区二区| 国产欧美一区二区在线观看| 2022国产精品视频| 精品国产电影一区二区| 欧美变态口味重另类| 日韩女优制服丝袜电影| 91精品欧美福利在线观看| 欧美日韩精品久久久| 欧美日韩视频在线第一区| 欧美性猛交xxxx乱大交退制版| 色999日韩国产欧美一区二区| 91麻豆国产精品久久| 色综合久久久久| 色婷婷激情综合| 欧美挠脚心视频网站| 91精品国产综合久久久久久漫画 | 韩国毛片一区二区三区| 国产最新精品免费| 高清国产一区二区| 97国产一区二区| 色94色欧美sute亚洲线路一ni | 免费看日韩a级影片| 午夜激情一区二区| 久久精品国内一区二区三区| 久久精品99国产精品日本| 国产真实精品久久二三区| 成人一区二区三区中文字幕| 99久久久久久| 正在播放一区二区| 久久免费电影网| 国产精品传媒入口麻豆| 亚洲福利一区二区| 蜜桃一区二区三区在线观看| 韩国欧美一区二区| 色噜噜夜夜夜综合网| 91精品国产高清一区二区三区| 精品国产一区二区三区久久影院| 国产精品系列在线| 亚洲国产视频直播| 国产精品 欧美精品| 色婷婷亚洲一区二区三区| 日韩欧美电影在线| 日韩伦理av电影| 老司机免费视频一区二区三区| 99久久精品免费观看| 欧美成人性福生活免费看| 国产精品超碰97尤物18| 日韩精品一区第一页| 成人综合婷婷国产精品久久| 欧美日韩精品二区第二页| 国产女主播一区| 美国十次综合导航| 91麻豆免费观看| 久久精品日韩一区二区三区| 亚洲线精品一区二区三区八戒| 韩国成人在线视频| 欧美视频在线观看一区| 日本一二三四高清不卡|