weka.attributeSelection
Class ASSearch

java.lang.Object
  |
  +--weka.attributeSelection.ASSearch
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
BestFirst, ExhaustiveSearch, ForwardSelection, GeneticSearch, RaceSearch, RandomSearch, Ranker, RankSearch

public abstract class ASSearch
extends java.lang.Object
implements java.io.Serializable

Abstract attribute selection search class.

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

Constructor Summary
ASSearch()
           
 
Method Summary
static ASSearch forName(java.lang.String searchName, java.lang.String[] options)
          Creates a new instance of a search class given it's class name and (optional) arguments to pass to it's setOptions method.
abstract  int[] search(ASEvaluation ASEvaluator, Instances data)
          Searches the attribute subset/ranking space.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ASSearch

public ASSearch()
Method Detail

search

public abstract int[] search(ASEvaluation ASEvaluator,
                             Instances data)
                      throws java.lang.Exception
Searches the attribute subset/ranking space.

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

forName

public static ASSearch forName(java.lang.String searchName,
                               java.lang.String[] options)
                        throws java.lang.Exception
Creates a new instance of a search class given it's class name and (optional) arguments to pass to it's setOptions method. If the search method implements OptionHandler and the options parameter is non-null, the search method will have it's options set.

Parameters:
searchName - the fully qualified class name of the search class
options - an array of options suitable for passing to setOptions. May be null.
Returns:
the newly created search object, ready for use.
Throws:
java.lang.Exception - if the search class name is invalid, or the options supplied are not acceptable to the search class.


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