All Packages Class Hierarchy This Package Previous Next Index WEKA's home
Class weka.attributeSelection.CfsSubsetEval
java.lang.Object
|
+----weka.attributeSelection.ASEvaluation
|
+----weka.attributeSelection.SubsetEvaluator
|
+----weka.attributeSelection.CfsSubsetEval
- public class CfsSubsetEval
- extends SubsetEvaluator
- implements OptionHandler
CFS attribute subset evaluator.
For more information see:
Hall, M. A. (1998). Correlation-based Feature Subset Selection for Machine
Learning. Thesis submitted in partial fulfilment of the requirements of the
degree of Doctor of Philosophy at the University of Waikato.
Valid options are:
-M
Treat missing values as a seperate value.
-L
Include locally predictive attributes.
- Version:
- $Revision: 1.6 $
- Author:
- Mark Hall (mhall@cs.waikato.ac.nz)
-
CfsSubsetEval()
- Constructor
-
buildEvaluator(Instances)
- Generates a attribute evaluator.
-
evaluateSubset(BitSet)
- evaluates a subset of attributes
-
getLocallyPredictive()
- Return true if including locally predictive attributes
-
getMissingSeperate()
- Return true is missing is treated as a seperate value
-
getOptions()
- Gets the current settings of CfsSubsetEval
-
listOptions()
- Returns an enumeration describing the available options
-
main(String[])
- Main method for testing this class.
-
postProcess(int[])
- Calls locallyPredictive in order to include locally predictive
attributes (if requested).
-
setLocallyPredictive(boolean)
- Include locally predictive attributes
-
setMissingSeperate(boolean)
- Treat missing as a seperate value
-
setOptions(String[])
- Parses and sets a given list of options.
-
toString()
- returns a string describing CFS
CfsSubsetEval
public CfsSubsetEval()
- Constructor
listOptions
public Enumeration listOptions()
- Returns an enumeration describing the available options
- Returns:
- an enumeration of all the available options
setOptions
public void setOptions(String options[]) throws Exception
- Parses and sets a given list of options.
Valid options are:
-M
Treat missing values as a seperate value.
-L
Include locally predictive attributes.
- Parameters:
- options - the list of options as an array of strings
- Throws: Exception
- if an option is not supported
setLocallyPredictive
public void setLocallyPredictive(boolean b)
- Include locally predictive attributes
- Parameters:
- b - true or false
getLocallyPredictive
public boolean getLocallyPredictive()
- Return true if including locally predictive attributes
- Returns:
- true if locally predictive attributes are to be used
setMissingSeperate
public void setMissingSeperate(boolean b)
- Treat missing as a seperate value
- Parameters:
- b - true or false
getMissingSeperate
public boolean getMissingSeperate()
- Return true is missing is treated as a seperate value
- Returns:
- true if missing is to be treated as a seperate value
getOptions
public String[] getOptions()
- Gets the current settings of CfsSubsetEval
- Returns:
- an array of strings suitable for passing to setOptions()
buildEvaluator
public void buildEvaluator(Instances data) throws Exception
- Generates a attribute evaluator. Has to initialize all fields of the
evaluator that are not being set via options.
CFS also discretises attributes (if necessary) and initializes
the correlation matrix.
- Parameters:
- data - set of instances serving as training data
- Throws: Exception
- if the evaluator has not been
generated successfully
- Overrides:
- buildEvaluator in class ASEvaluation
evaluateSubset
public double evaluateSubset(BitSet subset) throws Exception
- evaluates a subset of attributes
- Parameters:
- subset - a bitset representing the attribute subset to be
evaluated
- Throws: Exception
- if the subset could not be evaluated
- Overrides:
- evaluateSubset in class SubsetEvaluator
toString
public String toString()
- returns a string describing CFS
- Returns:
- the description as a string
- Overrides:
- toString in class Object
postProcess
public int[] postProcess(int attributeSet[]) throws Exception
- Calls locallyPredictive in order to include locally predictive
attributes (if requested).
- Parameters:
- attributeSet - the set of attributes found by the search
- Returns:
- a possibly ranked list of postprocessed attributes
- Throws: Exception
- if postprocessing fails for some reason
- Overrides:
- postProcess in class ASEvaluation
main
public static void main(String args[])
- Main method for testing this class.
- Parameters:
- args - the options
All Packages Class Hierarchy This Package Previous Next Index WEKA's home