Package moa.tasks
Class FeatureImportanceConfig
- java.lang.Object
-
- moa.AbstractMOAObject
-
- moa.options.AbstractOptionHandler
-
- moa.tasks.AbstractTask
-
- moa.tasks.MainTask
-
- moa.tasks.ClassificationMainTask
-
- moa.tasks.FeatureImportanceConfig
-
- All Implemented Interfaces:
Configurable
,Serializable
,CapabilitiesHandler
,MOAObject
,OptionHandler
,Task
public class FeatureImportanceConfig extends ClassificationMainTask implements CapabilitiesHandler
This class Provides GUI to user so that they can configure parameters for feature importance algorithm. After user clicks Run button, this class executes task to compute scores of feature importance.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description ClassOption
learnerOption
Provides GUI to user so that they can configure parameters for feature importance algorithm.protected boolean
m_doNotNormalizeFeatureScore
The default doNotNormalizeFeatureScore parameter for feature importance algorithm.protected Instances
m_instances
This holds the current set of instancesprotected double
m_NaNSubstitute
When scores of feature importance are NaNs, NaNs will be replaced by NaNSubstitute shown in feature importance line graph.protected int
m_windowSize
The default windowSize parameter for feature importance algorithm.FloatOption
nanSubstitute
protected JProgressBar
progressBar
Use progress bar to show the progress of computing scores of feature importance.protected double[][]
scores
Scores produced by feature importance algorithm.-
Fields inherited from class moa.tasks.ClassificationMainTask
events
-
Fields inherited from class moa.tasks.MainTask
INSTANCES_BETWEEN_MONITOR_UPDATES, outputFileOption
-
Fields inherited from class moa.options.AbstractOptionHandler
config
-
-
Constructor Summary
Constructors Constructor Description FeatureImportanceConfig()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Object
doMainTask(TaskMonitor monitor, ObjectRepository repository)
After user clicks Run button, this method executes task to compute scores of feature importance and return.boolean
doNotNormalizeFeatureScore()
double
getNaNSubstitute()
JProgressBar
getProgressBar()
String
getPurposeString()
Dictionary with option texts and objectsClass<?>
getTaskResultType()
Gets the result type of this task.int
getWindowSize()
void
setDoNotNormalizeFeatureScore(boolean doNotNormalizeFeatureScore)
void
setInstances(Instances instances)
void
setNaNSubstitute(double NaNSubstitute)
void
setWindowSize(int windowSize)
-
Methods inherited from class moa.tasks.ClassificationMainTask
defineImmutableCapabilities, getEventsList, setEventsList
-
Methods inherited from class moa.tasks.MainTask
doTaskImpl
-
Methods inherited from class moa.tasks.AbstractTask
doTask, doTask, getDescription, getTaskName, prepareForUseImpl
-
Methods inherited from class moa.options.AbstractOptionHandler
copy, getCLICreationString, getOptions, getPreparedClassOption, prepareClassOptions, prepareForUse, prepareForUse
-
Methods inherited from class moa.AbstractMOAObject
copy, measureByteSize, measureByteSize, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface moa.capabilities.CapabilitiesHandler
defineImmutableCapabilities, getCapabilities
-
Methods inherited from interface moa.MOAObject
measureByteSize
-
-
-
-
Field Detail
-
m_instances
protected Instances m_instances
This holds the current set of instances
-
scores
protected double[][] scores
Scores produced by feature importance algorithm.
-
m_NaNSubstitute
protected double m_NaNSubstitute
When scores of feature importance are NaNs, NaNs will be replaced by NaNSubstitute shown in feature importance line graph.
-
m_windowSize
protected int m_windowSize
The default windowSize parameter for feature importance algorithm.
-
m_doNotNormalizeFeatureScore
protected boolean m_doNotNormalizeFeatureScore
The default doNotNormalizeFeatureScore parameter for feature importance algorithm.
-
progressBar
protected JProgressBar progressBar
Use progress bar to show the progress of computing scores of feature importance.
-
learnerOption
public ClassOption learnerOption
Provides GUI to user so that they can configure parameters for feature importance algorithm.
-
nanSubstitute
public FloatOption nanSubstitute
-
-
Method Detail
-
getNaNSubstitute
public double getNaNSubstitute()
-
setNaNSubstitute
public void setNaNSubstitute(double NaNSubstitute)
-
getProgressBar
public JProgressBar getProgressBar()
-
getWindowSize
public int getWindowSize()
-
setWindowSize
public void setWindowSize(int windowSize)
-
doNotNormalizeFeatureScore
public boolean doNotNormalizeFeatureScore()
-
setDoNotNormalizeFeatureScore
public void setDoNotNormalizeFeatureScore(boolean doNotNormalizeFeatureScore)
-
doMainTask
protected Object doMainTask(TaskMonitor monitor, ObjectRepository repository)
After user clicks Run button, this method executes task to compute scores of feature importance and return.- Specified by:
doMainTask
in classMainTask
- Parameters:
monitor
- the TaskMonitor to userepository
- the ObjectRepository to use- Returns:
- scores of features' importance
-
getTaskResultType
public Class<?> getTaskResultType()
Description copied from interface:Task
Gets the result type of this task. Tasks can return LearningCurve, LearningEvaluation, Classifier, String, Instances..- Specified by:
getTaskResultType
in interfaceTask
- Returns:
- a class object of the result of this task
-
getPurposeString
public String getPurposeString()
Description copied from class:AbstractOptionHandler
Dictionary with option texts and objects- Specified by:
getPurposeString
in interfaceOptionHandler
- Overrides:
getPurposeString
in classAbstractOptionHandler
- Returns:
- the string with the purpose of this object
-
setInstances
public void setInstances(Instances instances)
-
-