Class AttributeSelection
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.opt.optimise.AbstractFitnessFunction
-
- adams.opt.optimise.genetic.fitnessfunctions.AbstractWEKAFitnessFunction
-
- adams.opt.optimise.genetic.fitnessfunctions.AttributeSelection
-
- All Implemented Interfaces:
Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,SizeOfHandler
,FitnessFunction
,Serializable
public class AttributeSelection extends AbstractWEKAFitnessFunction
Perform attribute selection using WEKA classification.- Version:
- $Revision$
- Author:
- dale
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class adams.opt.optimise.genetic.fitnessfunctions.AbstractWEKAFitnessFunction
AbstractWEKAFitnessFunction.Measure
-
-
Field Summary
-
Fields inherited from class adams.opt.optimise.genetic.fitnessfunctions.AbstractWEKAFitnessFunction
m_Classifier, m_ClassIndex, m_CrossValidationSeed, m_Dataset, m_Folds, m_init, m_Instances, m_Measure, m_OutputDirectory
-
Fields inherited from class adams.core.option.AbstractOptionHandler
m_OptionManager
-
Fields inherited from class adams.core.logging.LoggingObject
m_Logger, m_LoggingIsEnabled, m_LoggingLevel
-
-
Constructor Summary
Constructors Constructor Description AttributeSelection()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
evaluate(OptData opd)
Get fitness given vars.OptData
getDataDef()
String
getRemoveAsString(int[] m_weights)
Generates a range string of attributes to keep (= one has to use the inverse matching sense with the Remove filter).protected int[]
getWeights(OptData opd)
String
globalInfo()
Returns a string describing the object.void
newBest(double val, OptData opd)
Callback for best measure so far-
Methods inherited from class adams.opt.optimise.genetic.fitnessfunctions.AbstractWEKAFitnessFunction
classifierTipText, classIndexTipText, crossValidationSeedTipText, datasetTipText, defineOptions, foldsTipText, getClassifier, getClassIndex, getCrossValidationSeed, getDataset, getFolds, getInstances, getMeasure, getOutputDirectory, init, measureTipText, outputDirectoryTipText, setClassifier, setClassIndex, setCrossValidationSeed, setDataset, setFolds, setInstances, setMeasure, setOutputDirectory
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, initialize, loggingLevelTipText, newOptionManager, reset, setLoggingLevel, toCommandLine, toString
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel
-
-
-
-
Method Detail
-
globalInfo
public String globalInfo()
Description copied from class:AbstractOptionHandler
Returns a string describing the object.- Specified by:
globalInfo
in interfaceGlobalInfoSupporter
- Overrides:
globalInfo
in classAbstractWEKAFitnessFunction
- Returns:
- a description suitable for displaying in the gui
-
getDataDef
public OptData getDataDef()
-
getWeights
protected int[] getWeights(OptData opd)
-
evaluate
public double evaluate(OptData opd)
Description copied from interface:FitnessFunction
Get fitness given vars. Higher the better.- Parameters:
opd
- vars- Returns:
- fitness
-
getRemoveAsString
public String getRemoveAsString(int[] m_weights)
Generates a range string of attributes to keep (= one has to use the inverse matching sense with the Remove filter).- Returns:
- the range of attributes to keep
-
newBest
public void newBest(double val, OptData opd)
Callback for best measure so far- Specified by:
newBest
in interfaceFitnessFunction
- Overrides:
newBest
in classAbstractFitnessFunction
opd
- data for new best
-
-