weka.attributeSelection
Class RankSearch

java.lang.Object
  |
  +--weka.attributeSelection.ASSearch
        |
        +--weka.attributeSelection.RankSearch
All Implemented Interfaces:
OptionHandler, java.io.Serializable

public class RankSearch
extends ASSearch
implements OptionHandler

Class for evaluating a attribute ranking (given by a specified evaluator) using a specified subset evaluator.

Valid options are:

-A
Specify the attribute/subset evaluator to be used for generating the ranking. If a subset evaluator is specified then a forward selection search is used to produce a ranked list of attributes.

Version:
$Revision: 1.8 $
Author:
Mark Hall (mhall@cs.waikato.ac.nz)
See Also:
Serialized Form

Constructor Summary
RankSearch()
           
 
Method Summary
 java.lang.String attributeEvaluatorTipText()
          Returns the tip text for this property
 ASEvaluation getAttributeEvaluator()
          Get the attribute evaluator used to generate the ranking.
 java.lang.String[] getOptions()
          Gets the current settings of WrapperSubsetEval.
 java.lang.String globalInfo()
          Returns a string describing this search method
 java.util.Enumeration listOptions()
          Returns an enumeration describing the available options.
 int[] search(ASEvaluation ASEval, Instances data)
          Ranks attributes using the specified attribute evaluator and then searches the ranking using the supplied subset evaluator.
 void setAttributeEvaluator(ASEvaluation newEvaluator)
          Set the attribute evaluator to use for generating the ranking.
 void setOptions(java.lang.String[] options)
          Parses a given list of options.
 java.lang.String toString()
          returns a description of the search as a String
 
Methods inherited from class weka.attributeSelection.ASSearch
forName
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RankSearch

public RankSearch()
Method Detail

globalInfo

public java.lang.String globalInfo()
Returns a string describing this search method

Returns:
a description of the search method suitable for displaying in the explorer/experimenter gui

attributeEvaluatorTipText

public java.lang.String attributeEvaluatorTipText()
Returns the tip text for this property

Returns:
tip text for this property suitable for displaying in the explorer/experimenter gui

setAttributeEvaluator

public void setAttributeEvaluator(ASEvaluation newEvaluator)
Set the attribute evaluator to use for generating the ranking.

Parameters:
newEvaluator - the attribute evaluator to use.

getAttributeEvaluator

public ASEvaluation getAttributeEvaluator()
Get the attribute evaluator used to generate the ranking.

Returns:
the evaluator used to generate the ranking.

listOptions

public java.util.Enumeration listOptions()
Returns an enumeration describing the available options.

Specified by:
listOptions in interface OptionHandler
Returns:
an enumeration of all the available options.

setOptions

public void setOptions(java.lang.String[] options)
                throws java.lang.Exception
Parses a given list of options. Valid options are:

-A

Specified by:
setOptions in interface OptionHandler
Parameters:
options - the list of options as an array of strings
Throws:
java.lang.Exception - if an option is not supported

getOptions

public java.lang.String[] getOptions()
Gets the current settings of WrapperSubsetEval.

Specified by:
getOptions in interface OptionHandler
Returns:
an array of strings suitable for passing to setOptions()

search

public int[] search(ASEvaluation ASEval,
                    Instances data)
             throws java.lang.Exception
Ranks attributes using the specified attribute evaluator and then searches the ranking using the supplied subset evaluator.

Specified by:
search in class ASSearch
Parameters:
data - the training instances.
ASEval - the attribute evaluator to guide the search
Returns:
an array (not necessarily ordered) of selected attribute indexes
Throws:
java.lang.Exception - if the search can't be completed

toString

public java.lang.String toString()
returns a description of the search as a String

Overrides:
toString in class java.lang.Object
Returns:
a description of the search


Copyright (c) 2003 David Lindsay, Computer Learning Research Centre, Dept. Computer Science, Royal Holloway, University of London