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

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

?? relieffattributeeval.java

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

/**
 *
 *   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.Random;
import java.util.Vector;

import org.agentacademy.modules.dataminer.core.Attribute;
import org.agentacademy.modules.dataminer.core.Instance;
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.Utils;
import org.apache.log4j.Logger;

/**
 * Class for Evaluating attributes individually using ReliefF. <p>
 *
 * For more information see: <p>
 *
 * Kira, K. and Rendell, L. A. (1992). A practical approach to feature
 * selection. In D. Sleeman and P. Edwards, editors, <i>Proceedings of
 * the International Conference on Machine Learning,</i> pages 249-256.
 * Morgan Kaufmann. <p>
 *
 * Kononenko, I. (1994). Estimating attributes: analysis and extensions of
 * Relief. In De Raedt, L. and Bergadano, F., editors, <i> Machine Learning:
 * ECML-94, </i> pages 171-182. Springer Verlag. <p>
 *
 * Marko Robnik Sikonja, Igor Kononenko: An adaptation of Relief for attribute
 * estimation on regression. In D.Fisher (ed.): <i> Machine Learning,
 * Proceedings of 14th International Conference on Machine Learning ICML'97,
 * </i> Nashville, TN, 1997. <p>
 *
 *
 * Valid options are:
 *
 * -M <number of instances> <br>
 * Specify the number of instances to sample when estimating attributes. <br>
 * If not specified then all instances will be used. <p>
 *
 * -D <seed> <br>
 * Seed for randomly sampling instances. <p>
 *
 * -K <number of neighbours> <br>
 * Number of nearest neighbours to use for estimating attributes. <br>
 * (Default is 10). <p>
 *
 * -W <br>
 * Weight nearest neighbours by distance. <p>
 *
 * -A <sigma> <br>
 * Specify sigma value (used in an exp function to control how quickly <br>
 * weights decrease for more distant instances). Use in conjunction with <br>
 * -W. Sensible values = 1/5 to 1/10 the number of nearest neighbours. <br>
 *
 * @author Mark Hall (mhall@cs.waikato.ac.nz)
 * @version $Revision: 1.3 $
 */
public class ReliefFAttributeEval
  extends AttributeEvaluator
  implements OptionHandler
{
 public static Logger                log = Logger.getLogger(ReliefFAttributeEval.class);
  /** The training instances */
  private Instances m_trainInstances;

  /** The class index */
  private int m_classIndex;

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

  /** The number of instances */
  private int m_numInstances;

  /** Numeric class */
  private boolean m_numericClass;

  /** The number of classes if class is nominal */
  private int m_numClasses;

  /**
   * Used to hold the probability of a different class val given nearest
   * instances (numeric class)
   */
  private double m_ndc;

  /**
   * Used to hold the prob of different value of an attribute given
   * nearest instances (numeric class case)
   */
  private double[] m_nda;

  /**
   * Used to hold the prob of a different class val and different att
   * val given nearest instances (numeric class case)
   */
  private double[] m_ndcda;

  /** Holds the weights that relief assigns to attributes */
  private double[] m_weights;

  /** Prior class probabilities (discrete class case) */
  private double[] m_classProbs;

  /**
   * The number of instances to sample when estimating attributes
   * default == -1, use all instances
   */
  private int m_sampleM;

  /** The number of nearest hits/misses */
  private int m_Knn;

  /** k nearest scores + instance indexes for n classes */
  private double[][][] m_karray;

  /** Upper bound for numeric attributes */
  private double[] m_maxArray;

  /** Lower bound for numeric attributes */
  private double[] m_minArray;

  /** Keep track of the farthest instance for each class */
  private double[] m_worst;

  /** Index in the m_karray of the farthest instance for each class */
  private int[] m_index;

  /** Number of nearest neighbours stored of each class */
  private int[] m_stored;

  /** Random number seed used for sampling instances */
  private int m_seed;

  /**
   *  used to (optionally) weight nearest neighbours by their distance
   *  from the instance in question. Each entry holds
   *  exp(-((rank(r_i, i_j)/sigma)^2)) where rank(r_i,i_j) is the rank of
   *  instance i_j in a sequence of instances ordered by the distance
   *  from r_i. sigma is a user defined parameter, default=20
   **/
  private double[] m_weightsByRank;
  private int m_sigma;

  /** Weight by distance rather than equal weights */
  private boolean m_weightByDistance;

  /**
   * Returns a string describing this attribute evaluator
   * @return a description of the evaluator suitable for
   * displaying in the explorer/experimenter gui
   */
  public String globalInfo() {
    return "ReliefFAttributeEval :\n\nEvaluates the worth of an attribute by "
      +"repeatedly sampling an instance and considering the value of the "
      +"given attribute for the nearest instance of the same and different "
      +"class. Can operate on both discrete and continuous class data.\n";
  }

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


  /**
   * Returns an enumeration describing the available options.
   * @return an enumeration of all the available options.
   **/
  public Enumeration listOptions () {
    Vector newVector = new Vector(4);
    newVector
      .addElement(new Option("\tSpecify the number of instances to\n"
			     + "\tsample when estimating attributes.\n"
			     + "\tIf not specified, then all instances\n"
			     + "\twill be used.", "M", 1
			     , "-M <num instances>"));
    newVector.
      addElement(new Option("\tSeed for randomly sampling instances.\n"
			    + "\t(Default = 1)", "D", 1
			    , "-D <seed>"));
    newVector.
      addElement(new Option("\tNumber of nearest neighbours (k) used\n"
			    + "\tto estimate attribute relevances\n"
			    + "\t(Default = 10).", "K", 1
			    , "-K <number of neighbours>"));
    newVector.
      addElement(new Option("\tWeight nearest neighbours by distance\n", "W"
			    , 0, "-W"));
    newVector.
      addElement(new Option("\tSpecify sigma value (used in an exp\n"
			    + "\tfunction to control how quickly\n"
			    + "\tweights for more distant instances\n"
			    + "\tdecrease. Use in conjunction with -W.\n"
			    + "\tSensible value=1/5 to 1/10 of the\n"
			    + "\tnumber of nearest neighbours.\n"
			    + "\t(Default = 2)", "A", 1, "-A <num>"));
    return  newVector.elements();
  }


  /**
   * Parses a given list of options.
   *
   * Valid options are: <p>
   *
   * -M <number of instances> <br>
   * Specify the number of instances to sample when estimating attributes. <br>
   * If not specified then all instances will be used. <p>
   *
   * -D <seed> <br>
   * Seed for randomly sampling instances. <p>
   *
   * -K <number of neighbours> <br>
   * Number of nearest neighbours to use for estimating attributes. <br>
   * (Default is 10). <p>
   *
   * -W <br>
   * Weight nearest neighbours by distance. <p>
   *
   * -A <sigma> <br>
   * Specify sigma value (used in an exp function to control how quickly <br>
   * weights decrease for more distant instances). Use in conjunction with <br>
   * -W. Sensible values = 1/5 to 1/10 the number of nearest neighbours. <br>
   *
   * @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();
    setWeightByDistance(Utils.getFlag('W', options));
    optionString = Utils.getOption('M', options);

    if (optionString.length() != 0) {
      setSampleSize(Integer.parseInt(optionString));
    }

    optionString = Utils.getOption('D', options);

    if (optionString.length() != 0) {
      setSeed(Integer.parseInt(optionString));
    }

    optionString = Utils.getOption('K', options);

    if (optionString.length() != 0) {
      setNumNeighbours(Integer.parseInt(optionString));
    }

    optionString = Utils.getOption('A', options);

    if (optionString.length() != 0) {
      setWeightByDistance(true); // turn on weighting by distance
      setSigma(Integer.parseInt(optionString));
    }
  }

  /**
   * Returns the tip text for this property
   * @return tip text for this property suitable for
   * displaying in the explorer/experimenter gui
   */
  public String sigmaTipText() {
    return "Set influence of nearest neighbours. Used in an exp function to "
      +"control how quickly weights decrease for more distant instances. "
      +"Use in conjunction with weightByDistance. Sensible values = 1/5 to "
      +"1/10 the number of nearest neighbours.";
  }

  /**
   * Sets the sigma value.
   *
   * @param s the value of sigma (> 0)
   * @exception Exception if s is not positive
   */
  public void setSigma (int s)
    throws Exception
  {
    if (s <= 0) {
      throw  new Exception("value of sigma must be > 0!");
    }

    m_sigma = s;
  }


  /**
   * Get the value of sigma.
   *
   * @return the sigma value.
   */
  public int getSigma () {
    return  m_sigma;
  }

  /**
   * Returns the tip text for this property
   * @return tip text for this property suitable for
   * displaying in the explorer/experimenter gui
   */
  public String numNeighboursTipText() {
    return "Number of nearest neighbours for attribute estimation.";
  }

  /**
   * Set the number of nearest neighbours
   *
   * @param n the number of nearest neighbours.
   */
  public void setNumNeighbours (int n) {
    m_Knn = n;
  }


  /**
   * Get the number of nearest neighbours
   *
   * @return the number of nearest neighbours
   */
  public int getNumNeighbours () {
    return  m_Knn;
  }

  /**
   * Returns the tip text for this property
   * @return tip text for this property suitable for
   * displaying in the explorer/experimenter gui
   */
  public String seedTipText() {
    return "Random seed for sampling instances.";
  }

  /**
   * Set the random number seed for randomly sampling instances.
   *
   * @param s the random number seed.
   */
  public void setSeed (int s) {
    m_seed = s;
  }


  /**
   * Get the seed used for randomly sampling instances.
   *
   * @return the random number seed.
   */
  public int getSeed () {
    return  m_seed;
  }

  /**
   * Returns the tip text for this property
   * @return tip text for this property suitable for
   * displaying in the explorer/experimenter gui
   */
  public String sampleSizeTipText() {
    return "Number of instances to sample. Default (-1) indicates that all "
      +"instances will be used for attribute estimation.";
  }

  /**
   * Set the number of instances to sample for attribute estimation
   *
   * @param s the number of instances to sample.
   */
  public void setSampleSize (int s) {
    m_sampleM = s;
  }


  /**
   * Get the number of instances used for estimating attributes
   *
   * @return the number of instances.
   */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美一级电影网站| 麻豆精品在线观看| 美女爽到高潮91| 波多野结衣精品在线| 欧美成人一级视频| 亚洲影院在线观看| 成人av在线影院| 日韩欧美亚洲国产精品字幕久久久| 中文字幕一区二区三中文字幕| 老司机免费视频一区二区 | 欧美日本精品一区二区三区| 久久精品亚洲精品国产欧美kt∨ | 免费在线观看一区| 色88888久久久久久影院野外| 久久精品日韩一区二区三区| 另类小说图片综合网| 欧美精品一级二级三级| 亚洲精品免费视频| 99在线精品观看| 欧美极品另类videosde| 国内外成人在线| 精品欧美乱码久久久久久 | 欧美老肥妇做.爰bbww视频| 亚洲男人都懂的| 91免费视频大全| 国产精品剧情在线亚洲| 处破女av一区二区| 欧美国产亚洲另类动漫| 国产成人在线视频网站| 国产精品污污网站在线观看 | 男女男精品视频网| 4438成人网| 日本sm残虐另类| 精品三级在线观看| 国产精品中文欧美| 国产欧美日韩在线| 91亚洲大成网污www| 亚洲青青青在线视频| 91在线视频在线| 亚洲综合999| 欧美一区二区人人喊爽| 麻豆精品久久精品色综合| 91精品国产一区二区三区蜜臀| 首页国产欧美日韩丝袜| 欧美xxxxx牲另类人与| 国产精品自产自拍| 国产精品女人毛片| 欧美在线你懂的| 视频精品一区二区| 日韩精品一区二区三区在线| 国产自产高清不卡| 国产精品天美传媒沈樵| 91女神在线视频| 日韩和欧美的一区| 欧美精品一区二区三区高清aⅴ | 欧美中文字幕亚洲一区二区va在线| 一区二区三区中文字幕电影| 538在线一区二区精品国产| 精品一区二区成人精品| 欧美高清在线精品一区| 欧美调教femdomvk| 国内精品自线一区二区三区视频| 国产亚洲精品bt天堂精选| 91蝌蚪国产九色| 人禽交欧美网站| 国产精品久久久一本精品| 欧美日韩国产综合视频在线观看| 美女国产一区二区三区| 成人欧美一区二区三区在线播放| 欧美人伦禁忌dvd放荡欲情| 韩国中文字幕2020精品| 亚洲综合在线免费观看| 久久综合九色综合欧美亚洲| 日本高清不卡视频| 国产高清成人在线| 首页国产欧美日韩丝袜| 国产精品久久久久久久浪潮网站 | 久久午夜免费电影| 欧美亚洲自拍偷拍| 成人aa视频在线观看| 日本欧美韩国一区三区| 亚洲欧美综合另类在线卡通| 精品久久一二三区| 欧美日韩免费视频| 本田岬高潮一区二区三区| 久久爱另类一区二区小说| 一区二区视频免费在线观看| 国产亚洲女人久久久久毛片| 91精品福利在线一区二区三区| 99麻豆久久久国产精品免费| 精品制服美女丁香| 日韩电影在线一区二区三区| 国产精品久久久久久久裸模| 久久久久久久久久看片| 制服视频三区第一页精品| 在线观看免费亚洲| 99久久99久久免费精品蜜臀| 国产成人自拍网| 国产一区二区三区观看| 久久电影网站中文字幕| 丝袜美腿亚洲色图| 亚洲成a人v欧美综合天堂下载| 亚洲三级免费观看| 成人欧美一区二区三区小说| 亚洲国产精品99久久久久久久久| 欧美精品一区二区久久婷婷| 日韩免费福利电影在线观看| 制服.丝袜.亚洲.中文.综合| 7777精品伊人久久久大香线蕉完整版 | 青青草成人在线观看| 丝袜美腿高跟呻吟高潮一区| 一区二区久久久久| 亚洲精品国产无天堂网2021 | 91欧美一区二区| 99国产一区二区三精品乱码| 成人黄动漫网站免费app| 国产精品中文欧美| 国产成人av电影在线观看| 国产精品538一区二区在线| 国产精品一品视频| 成人性视频免费网站| www.av亚洲| 欧美亚洲图片小说| 欧美乱妇20p| 欧美大肚乱孕交hd孕妇| 精品国产乱码久久久久久夜甘婷婷| 日韩一区二区电影在线| 精品少妇一区二区三区免费观看 | 亚洲男人的天堂一区二区| 亚洲免费av高清| 日韩国产在线观看一区| 免费在线观看精品| 国产精品123| 色婷婷av一区二区三区之一色屋| 欧美在线你懂的| 日韩欧美一区二区三区在线| 精品国产a毛片| 国产精品狼人久久影院观看方式| 亚洲精品免费在线观看| 奇米亚洲午夜久久精品| 高清在线观看日韩| 欧美性欧美巨大黑白大战| 日韩精品中文字幕一区二区三区 | 一区二区三区四区蜜桃| 日本va欧美va精品| 成人福利视频网站| 欧美老肥妇做.爰bbww视频| 国产亚洲一本大道中文在线| 亚洲欧洲精品天堂一级| 日本欧美一区二区三区乱码| 成人免费高清在线观看| 欧美日本视频在线| 国产精品麻豆视频| 午夜激情一区二区三区| 国产99精品国产| 欧美精品 国产精品| 中文字幕欧美日本乱码一线二线| 亚洲国产婷婷综合在线精品| 国产精品一区二区免费不卡| 在线免费观看日韩欧美| 国产拍揄自揄精品视频麻豆| 亚洲电影在线播放| 播五月开心婷婷综合| 日韩欧美一级特黄在线播放| 亚洲精品成人少妇| 国产精品性做久久久久久| 欧美日韩成人激情| 自拍偷拍亚洲综合| 国产精品一区二区x88av| 欧美久久免费观看| 伊人夜夜躁av伊人久久| 国产精品白丝jk白祙喷水网站| 欧美日韩免费观看一区三区| 亚洲欧洲在线观看av| 国产一区二区三区免费播放| 欧美高清视频一二三区| 伊人色综合久久天天| 粉嫩久久99精品久久久久久夜| 日韩精品一区二区在线| 五月天一区二区| 欧美亚日韩国产aⅴ精品中极品| 国产精品天美传媒| 国产黄色精品视频| 精品国产免费人成电影在线观看四季| 亚洲综合自拍偷拍| 91高清视频在线| 亚洲精品国产品国语在线app| 国产69精品一区二区亚洲孕妇| 欧美v日韩v国产v| 日韩电影在线观看网站| 色老综合老女人久久久| 亚洲视频一二三| 91麻豆swag| 亚洲免费资源在线播放| 91视频你懂的| 一片黄亚洲嫩模| 91久久免费观看| 一二三区精品视频| 欧洲国产伦久久久久久久| 亚洲线精品一区二区三区八戒|