类 ReliefFAttributeEval

java.lang.Object
weka.attributeSelection.ASEvaluation
weka.attributeSelection.ReliefFAttributeEval
所有已实现的接口:
Serializable, AttributeEvaluator, CapabilitiesHandler, OptionHandler, RevisionHandler, TechnicalInformationHandler

public class ReliefFAttributeEval extends ASEvaluation implements AttributeEvaluator, OptionHandler, TechnicalInformationHandler
ReliefFAttributeEval :

Evaluates 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.

For more information see:

Kenji Kira, Larry A. Rendell: A Practical Approach to Feature Selection. In: Ninth International Workshop on Machine Learning, 249-256, 1992.

Igor Kononenko: Estimating Attributes: Analysis and Extensions of RELIEF. In: European Conference on Machine Learning, 171-182, 1994.

Marko Robnik-Sikonja, Igor Kononenko: An adaptation of Relief for attribute estimation in regression. In: Fourteenth International Conference on Machine Learning, 296-304, 1997.

BibTeX:

 @inproceedings{Kira1992,
    author = {Kenji Kira and Larry A. Rendell},
    booktitle = {Ninth International Workshop on Machine Learning},
    editor = {Derek H. Sleeman and Peter Edwards},
    pages = {249-256},
    publisher = {Morgan Kaufmann},
    title = {A Practical Approach to Feature Selection},
    year = {1992}
 }
 
 @inproceedings{Kononenko1994,
    author = {Igor Kononenko},
    booktitle = {European Conference on Machine Learning},
    editor = {Francesco Bergadano and Luc De Raedt},
    pages = {171-182},
    publisher = {Springer},
    title = {Estimating Attributes: Analysis and Extensions of RELIEF},
    year = {1994}
 }
 
 @inproceedings{Robnik-Sikonja1997,
    author = {Marko Robnik-Sikonja and Igor Kononenko},
    booktitle = {Fourteenth International Conference on Machine Learning},
    editor = {Douglas H. Fisher},
    pages = {296-304},
    publisher = {Morgan Kaufmann},
    title = {An adaptation of Relief for attribute estimation in regression},
    year = {1997}
 }
 

Valid options are:

 -M <num instances>
  Specify the number of instances to
  sample when estimating attributes.
  If not specified, then all instances
  will be used.
 -D <seed>
  Seed for randomly sampling instances.
  (Default = 1)
 -K <number of neighbours>
  Number of nearest neighbours (k) used
  to estimate attribute relevances
  (Default = 10).
 -W
  Weight nearest neighbours by distance
 -A <num>
  Specify sigma value (used in an exp
  function to control how quickly
  weights for more distant instances
  decrease. Use in conjunction with -W.
  Sensible value=1/5 to 1/10 of the
  number of nearest neighbours.
  (Default = 2)
版本:
$Revision: 11219 $
作者:
Mark Hall (mhall@cs.waikato.ac.nz)
另请参阅:
  • 构造器详细资料

    • ReliefFAttributeEval

      public ReliefFAttributeEval()
      Constructor
  • 方法详细资料

    • globalInfo

      public String globalInfo()
      Returns a string describing this attribute evaluator
      返回:
      a description of the evaluator suitable for displaying in the explorer/experimenter gui
    • getTechnicalInformation

      public TechnicalInformation getTechnicalInformation()
      Returns an instance of a TechnicalInformation object, containing detailed information about the technical background of this class, e.g., paper reference or book this class is based on.
      指定者:
      getTechnicalInformation 在接口中 TechnicalInformationHandler
      返回:
      the technical information about this class
    • listOptions

      public Enumeration listOptions()
      Returns an enumeration describing the available options.
      指定者:
      listOptions 在接口中 OptionHandler
      返回:
      an enumeration of all the available options.
    • setOptions

      public void setOptions(String[] options) throws Exception
      Parses a given list of options.

      Valid options are:

       -M <num instances>
        Specify the number of instances to
        sample when estimating attributes.
        If not specified, then all instances
        will be used.
       -D <seed>
        Seed for randomly sampling instances.
        (Default = 1)
       -K <number of neighbours>
        Number of nearest neighbours (k) used
        to estimate attribute relevances
        (Default = 10).
       -W
        Weight nearest neighbours by distance
       -A <num>
        Specify sigma value (used in an exp
        function to control how quickly
        weights for more distant instances
        decrease. Use in conjunction with -W.
        Sensible value=1/5 to 1/10 of the
        number of nearest neighbours.
        (Default = 2)
      指定者:
      setOptions 在接口中 OptionHandler
      参数:
      options - the list of options as an array of strings
      抛出:
      Exception - if an option is not supported
    • sigmaTipText

      public String sigmaTipText()
      Returns the tip text for this property
      返回:
      tip text for this property suitable for displaying in the explorer/experimenter gui
    • setSigma

      public void setSigma(int s) throws Exception
      Sets the sigma value.
      参数:
      s - the value of sigma (> 0)
      抛出:
      Exception - if s is not positive
    • getSigma

      public int getSigma()
      Get the value of sigma.
      返回:
      the sigma value.
    • numNeighboursTipText

      public String numNeighboursTipText()
      Returns the tip text for this property
      返回:
      tip text for this property suitable for displaying in the explorer/experimenter gui
    • setNumNeighbours

      public void setNumNeighbours(int n)
      Set the number of nearest neighbours
      参数:
      n - the number of nearest neighbours.
    • getNumNeighbours

      public int getNumNeighbours()
      Get the number of nearest neighbours
      返回:
      the number of nearest neighbours
    • seedTipText

      public String seedTipText()
      Returns the tip text for this property
      返回:
      tip text for this property suitable for displaying in the explorer/experimenter gui
    • setSeed

      public void setSeed(int s)
      Set the random number seed for randomly sampling instances.
      参数:
      s - the random number seed.
    • getSeed

      public int getSeed()
      Get the seed used for randomly sampling instances.
      返回:
      the random number seed.
    • sampleSizeTipText

      public String sampleSizeTipText()
      Returns the tip text for this property
      返回:
      tip text for this property suitable for displaying in the explorer/experimenter gui
    • setSampleSize

      public void setSampleSize(int s)
      Set the number of instances to sample for attribute estimation
      参数:
      s - the number of instances to sample.
    • getSampleSize

      public int getSampleSize()
      Get the number of instances used for estimating attributes
      返回:
      the number of instances.
    • weightByDistanceTipText

      public String weightByDistanceTipText()
      Returns the tip text for this property
      返回:
      tip text for this property suitable for displaying in the explorer/experimenter gui
    • setWeightByDistance

      public void setWeightByDistance(boolean b)
      Set the nearest neighbour weighting method
      参数:
      b - true nearest neighbours are to be weighted by distance.
    • getWeightByDistance

      public boolean getWeightByDistance()
      Get whether nearest neighbours are being weighted by distance
      返回:
      m_weightByDiffernce
    • getOptions

      public String[] getOptions()
      Gets the current settings of ReliefFAttributeEval.
      指定者:
      getOptions 在接口中 OptionHandler
      返回:
      an array of strings suitable for passing to setOptions()
    • toString

      public String toString()
      Return a description of the ReliefF attribute evaluator.
      覆盖:
      toString 在类中 Object
      返回:
      a description of the evaluator as a String.
    • getCapabilities

      public Capabilities getCapabilities()
      Returns the capabilities of this evaluator.
      指定者:
      getCapabilities 在接口中 CapabilitiesHandler
      覆盖:
      getCapabilities 在类中 ASEvaluation
      返回:
      the capabilities of this evaluator
      另请参阅:
    • buildEvaluator

      public void buildEvaluator(Instances data) throws Exception
      Initializes a ReliefF attribute evaluator.
      指定者:
      buildEvaluator 在类中 ASEvaluation
      参数:
      data - set of instances serving as training data
      抛出:
      Exception - if the evaluator has not been generated successfully
    • evaluateAttribute

      public double evaluateAttribute(int attribute) throws Exception
      Evaluates an individual attribute using ReliefF's instance based approach. The actual work is done by buildEvaluator which evaluates all features.
      指定者:
      evaluateAttribute 在接口中 AttributeEvaluator
      参数:
      attribute - the index of the attribute to be evaluated
      返回:
      the "merit" of the attribute
      抛出:
      Exception - if the attribute could not be evaluated
    • getRevision

      public String getRevision()
      Returns the revision string.
      指定者:
      getRevision 在接口中 RevisionHandler
      覆盖:
      getRevision 在类中 ASEvaluation
      返回:
      the revision
    • postProcess

      public int[] postProcess(int[] attributeSet)
      从类复制的说明: ASEvaluation
      Provides a chance for a attribute evaluator to do any special post processing of the selected attribute set.
      覆盖:
      postProcess 在类中 ASEvaluation
      参数:
      attributeSet - the set of attributes found by the search
      返回:
      a possibly ranked list of postprocessed attributes
    • main

      public static void main(String[] args)
      Main method for testing this class.
      参数:
      args - the options