public class CfsSubsetEval extends ASEvaluation implements SubsetEvaluator, ThreadSafe, OptionHandler, TechnicalInformationHandler
@phdthesis{Hall1998,
address = {Hamilton, New Zealand},
author = {M. A. Hall},
school = {University of Waikato},
title = {Correlation-based Feature Subset Selection for Machine Learning},
year = {1998}
}
Valid options are:
-M Treat missing values as a separate value.
-L Don't include locally predictive attributes.
-Z Precompute the full correlation matrix at the outset, rather than compute correlations lazily (as needed) during the search. Use this in conjuction with parallel processing in order to speed up a backward search.
-P <int> The size of the thread pool, for example, the number of cores in the CPU. (default 1)
-E <int> The number of threads to use, which should be >= size of thread pool. (default 1)
-D Output debugging info.
Discretize,
Serialized Form| Constructor and Description |
|---|
CfsSubsetEval()
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
buildEvaluator(Instances data)
Generates a attribute evaluator.
|
void |
clean()
Tells the evaluator that the attribute selection process is complete.
|
java.lang.String |
debugTipText()
Returns the tip text for this property
|
double |
evaluateSubset(java.util.BitSet subset)
evaluates a subset of attributes
|
Capabilities |
getCapabilities()
Returns the capabilities of this evaluator.
|
boolean |
getDebug()
Set whether to output debugging info
|
boolean |
getLocallyPredictive()
Return true if including locally predictive attributes
|
boolean |
getMissingSeparate()
Return true is missing is treated as a separate value
|
int |
getNumThreads()
Gets the number of threads.
|
java.lang.String[] |
getOptions()
Gets the current settings of CfsSubsetEval
|
int |
getPoolSize()
Gets the number of threads.
|
boolean |
getPreComputeCorrelationMatrix()
Get whether to pre-compute the full correlation matrix at the outset,
rather than computing individual correlations lazily (as needed) during the
search.
|
java.lang.String |
getRevision()
Returns the revision string.
|
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.
|
java.lang.String |
globalInfo()
Returns a string describing this attribute evaluator
|
java.util.Enumeration<Option> |
listOptions()
Returns an enumeration describing the available options.
|
java.lang.String |
locallyPredictiveTipText()
Returns the tip text for this property
|
static void |
main(java.lang.String[] args)
Main method for testing this class.
|
java.lang.String |
missingSeparateTipText()
Returns the tip text for this property
|
java.lang.String |
numThreadsTipText() |
java.lang.String |
poolSizeTipText() |
int[] |
postProcess(int[] attributeSet)
Calls locallyPredictive in order to include locally predictive attributes
(if requested).
|
java.lang.String |
preComputeCorrelationMatrixTipText() |
void |
setDebug(boolean d)
Set whether to output debugging info
|
void |
setLocallyPredictive(boolean b)
Include locally predictive attributes
|
void |
setMissingSeparate(boolean b)
Treat missing as a separate value
|
void |
setNumThreads(int nT)
Sets the number of threads
|
void |
setOptions(java.lang.String[] options)
Parses and sets a given list of options.
|
void |
setPoolSize(int nT)
Sets the number of threads
|
void |
setPreComputeCorrelationMatrix(boolean p)
Set whether to pre-compute the full correlation matrix at the outset,
rather than computing individual correlations lazily (as needed) during the
search.
|
java.lang.String |
toString()
returns a string describing CFS
|
doNotCheckCapabilitiesTipText, forName, getDoNotCheckCapabilities, makeCopies, postExecution, preExecution, run, runEvaluator, setDoNotCheckCapabilitiesequals, getClass, hashCode, notify, notifyAll, wait, wait, waitmakeCopypublic java.lang.String globalInfo()
public TechnicalInformation getTechnicalInformation()
getTechnicalInformation in interface TechnicalInformationHandlerpublic java.util.Enumeration<Option> listOptions()
listOptions in interface OptionHandlerlistOptions in class ASEvaluationpublic void setOptions(java.lang.String[] options)
throws java.lang.Exception
-M Treat missing values as a separate value.
-L Don't include locally predictive attributes.
-Z Precompute the full correlation matrix at the outset, rather than compute correlations lazily (as needed) during the search. Use this in conjuction with parallel processing in order to speed up a backward search.
-P <int> The size of the thread pool, for example, the number of cores in the CPU. (default 1)
-E <int> The number of threads to use, which should be >= size of thread pool. (default 1)
-D Output debugging info.
setOptions in interface OptionHandlersetOptions in class ASEvaluationoptions - the list of options as an array of stringsjava.lang.Exception - if an option is not supportedpublic java.lang.String preComputeCorrelationMatrixTipText()
public void setPreComputeCorrelationMatrix(boolean p)
p - true if the correlation matrix is to be pre-computed at the outsetpublic boolean getPreComputeCorrelationMatrix()
public java.lang.String numThreadsTipText()
public int getNumThreads()
public void setNumThreads(int nT)
public java.lang.String poolSizeTipText()
public int getPoolSize()
public void setPoolSize(int nT)
public java.lang.String locallyPredictiveTipText()
public void setLocallyPredictive(boolean b)
b - true or falsepublic boolean getLocallyPredictive()
public java.lang.String missingSeparateTipText()
public void setMissingSeparate(boolean b)
b - true or falsepublic boolean getMissingSeparate()
public void setDebug(boolean d)
d - true if debugging info is to be outputpublic boolean getDebug()
public java.lang.String debugTipText()
public java.lang.String[] getOptions()
getOptions in interface OptionHandlergetOptions in class ASEvaluationpublic Capabilities getCapabilities()
getCapabilities in interface CapabilitiesHandlergetCapabilities in class ASEvaluationCapabilitiespublic void buildEvaluator(Instances data) throws java.lang.Exception
buildEvaluator in class ASEvaluationdata - set of instances serving as training datajava.lang.Exception - if the evaluator has not been generated successfullypublic double evaluateSubset(java.util.BitSet subset)
throws java.lang.Exception
evaluateSubset in interface SubsetEvaluatorsubset - a bitset representing the attribute subset to be evaluatedjava.lang.Exception - if the subset could not be evaluatedpublic java.lang.String toString()
toString in class java.lang.Objectpublic int[] postProcess(int[] attributeSet)
throws java.lang.Exception
postProcess in class ASEvaluationattributeSet - the set of attributes found by the searchjava.lang.Exception - if postprocessing fails for some reasonpublic void clean()
ASEvaluationclean in class ASEvaluationpublic java.lang.String getRevision()
getRevision in interface RevisionHandlergetRevision in class ASEvaluationpublic static void main(java.lang.String[] args)
args - the options