Package weka.attributeSelection
Class FilteredSubsetEval
java.lang.Object
weka.attributeSelection.ASEvaluation
weka.attributeSelection.FilteredSubsetEval
- All Implemented Interfaces:
Serializable
,SubsetEvaluator
,CapabilitiesHandler
,OptionHandler
,RevisionHandler
public class FilteredSubsetEval
extends ASEvaluation
implements Serializable, SubsetEvaluator, OptionHandler
Class for running an arbitrary subset evaluator on data that has been passed through an arbitrary
filter (note: filters that alter the order or number of attributes are not allowed).
Like the evaluator, the structure of the filter is based exclusively on the training data.
Valid options are:
-W <evaluator specification> Full name of base evaluator to use, followed by evaluator options. eg: "weka.attributeSelection.CfsSubsetEval -L"
-F <filter specification> Full class name of filter to use, followed by filter options. eg: "weka.filters.supervised.instance.SpreadSubsample -M 1"
- Version:
- $Revision: 5562 $
- Author:
- Mark Hall (mhall{[at]}pentaho{[dot]}com)
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
buildEvaluator
(Instances data) Initializes a filtered attribute evaluator.double
evaluateSubset
(BitSet subset) evaluates a subset of attributesReturns the tip text for this propertyReturns default capabilities of the evaluator.Get the filter to useString[]
Gets the current settings of the subset evaluator.Returns the revision string.Get the subset evaluator to useReturns an enumeration describing the available options.static void
Main method for testing this class.void
Set the filter to usevoid
setOptions
(String[] options) Parses a given list of options.void
setSubsetEvaluator
(ASEvaluation newEvaluator) Set the subset evaluator to useReturns the tip text for this propertytoString()
Describe the attribute evaluatorMethods inherited from class weka.attributeSelection.ASEvaluation
clean, forName, makeCopies, postProcess
-
Constructor Details
-
FilteredSubsetEval
public FilteredSubsetEval()
-
-
Method Details
-
getCapabilities
Returns default capabilities of the evaluator.- Specified by:
getCapabilities
in interfaceCapabilitiesHandler
- Overrides:
getCapabilities
in classASEvaluation
- Returns:
- the capabilities of this evaluator.
- See Also:
-
globalInfo
- Returns:
- a description of the evaluator suitable for displaying in the explorer/experimenter gui
-
listOptions
Returns an enumeration describing the available options.- Specified by:
listOptions
in interfaceOptionHandler
- Returns:
- an enumeration of all the available options.
-
setOptions
Parses a given list of options. Valid options are:-W <evaluator specification> Full name of base evaluator to use, followed by evaluator options. eg: "weka.attributeSelection.CfsSubsetEval -L"
-F <filter specification> Full class name of filter to use, followed by filter options. eg: "weka.filters.supervised.instance.SpreadSubsample -M 1"
- Specified by:
setOptions
in interfaceOptionHandler
- Parameters:
options
- the list of options as an array of strings- Throws:
Exception
- if an option is not supported
-
getOptions
Gets the current settings of the subset evaluator.- Specified by:
getOptions
in interfaceOptionHandler
- Returns:
- an array of strings suitable for passing to setOptions
-
subsetEvaluatorTipText
Returns the tip text for this property- Returns:
- tip text for this property suitable for displaying in the explorer/experimenter gui
-
setSubsetEvaluator
Set the subset evaluator to use- Parameters:
newEvaluator
- the subset evaluator to use
-
getSubsetEvaluator
Get the subset evaluator to use- Returns:
- the subset evaluator to use
-
filterTipText
Returns the tip text for this property- Returns:
- tip text for this property suitable for displaying in the explorer/experimenter gui
-
setFilter
Set the filter to use- Parameters:
newFilter
- the filter to use
-
getFilter
Get the filter to use- Returns:
- the filter to use
-
getRevision
Returns the revision string.- Specified by:
getRevision
in interfaceRevisionHandler
- Overrides:
getRevision
in classASEvaluation
- Returns:
- the revision
-
buildEvaluator
Initializes a filtered attribute evaluator.- Specified by:
buildEvaluator
in classASEvaluation
- Parameters:
data
- set of instances serving as training data- Throws:
Exception
- if the evaluator has not been generated successfully
-
evaluateSubset
evaluates a subset of attributes- Specified by:
evaluateSubset
in interfaceSubsetEvaluator
- Parameters:
subset
- a bitset representing the attribute subset to be evaluated- Returns:
- the "merit" of the subset
- Throws:
Exception
- if the subset could not be evaluated
-
toString
Describe the attribute evaluator -
main
Main method for testing this class.- Parameters:
args
- the options
-