Class Train
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.gui.tools.wekainvestigator.evaluation.AbstractEvaluation<AttributeSelectionTab,ResultItem>
-
- adams.gui.tools.wekainvestigator.tab.attseltab.evaluation.AbstractAttributeSelectionEvaluation
-
- adams.gui.tools.wekainvestigator.tab.attseltab.evaluation.Train
-
- All Implemented Interfaces:
adams.core.GlobalInfoSupporter
,adams.core.logging.LoggingSupporter
,adams.core.SizeOfHandler
,adams.core.StatusMessageHandler
,Serializable
public class Train extends AbstractAttributeSelectionEvaluation
Performs attribute selection on the train data.- Version:
- $Revision$
- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static String
KEY_DATASET
protected adams.gui.core.BaseComboBox<String>
m_ComboBoxDatasets
the datasets.protected DefaultComboBoxModel<String>
m_ModelDatasets
the datasets model.protected adams.gui.core.ParameterPanel
m_PanelParameters
the panel with the parameters.-
Fields inherited from class adams.gui.tools.wekainvestigator.evaluation.AbstractEvaluation
m_Owner, m_PanelOptions
-
-
Constructor Summary
Constructors Constructor Description Train()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
activate(int index)
Activates the specified dataset.String
canEvaluate(weka.attributeSelection.ASEvaluation evaluator, weka.attributeSelection.ASSearch search)
Tests whether attribute selection can be performed.void
deserialize(Map<String,Object> data, adams.core.MessageCollection errors)
Restores the objects.protected void
doEvaluate(weka.attributeSelection.ASEvaluation evaluator, weka.attributeSelection.ASSearch search, ResultItem item)
Performs attribute selections and updates the result item.String
getName()
Returns the name of the evaluation (displayed in combobox).String
globalInfo()
Returns a string describing the object.ResultItem
init(weka.attributeSelection.ASEvaluation evaluator, weka.attributeSelection.ASSearch search)
Initializes the result item.protected void
initGUI()
Initializes the widgets.Map<String,Object>
serialize(Set<AbstractInvestigatorTab.SerializationOption> options)
Returns the objects for serialization.void
update()
Updates the settings panel.-
Methods inherited from class adams.gui.tools.wekainvestigator.tab.attseltab.evaluation.AbstractAttributeSelectionEvaluation
evaluate, getEvaluations
-
Methods inherited from class adams.gui.tools.wekainvestigator.evaluation.AbstractEvaluation
addObjectSize, addToHistory, getOwner, getPanel, getProperties, getTestingUpdateInterval, initialize, isValidDataIndex, listOrArray, setOwner, showStatus, toString
-
-
-
-
Field Detail
-
KEY_DATASET
public static final String KEY_DATASET
- See Also:
- Constant Field Values
-
m_PanelParameters
protected adams.gui.core.ParameterPanel m_PanelParameters
the panel with the parameters.
-
m_ComboBoxDatasets
protected adams.gui.core.BaseComboBox<String> m_ComboBoxDatasets
the datasets.
-
m_ModelDatasets
protected DefaultComboBoxModel<String> m_ModelDatasets
the datasets model.
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Returns:
- a description suitable for displaying in the gui
-
initGUI
protected void initGUI()
Initializes the widgets.- Overrides:
initGUI
in classAbstractEvaluation<AttributeSelectionTab,ResultItem>
-
getName
public String getName()
Returns the name of the evaluation (displayed in combobox).- Specified by:
getName
in classAbstractEvaluation<AttributeSelectionTab,ResultItem>
- Returns:
- the name
-
canEvaluate
public String canEvaluate(weka.attributeSelection.ASEvaluation evaluator, weka.attributeSelection.ASSearch search)
Tests whether attribute selection can be performed.- Specified by:
canEvaluate
in classAbstractAttributeSelectionEvaluation
- Returns:
- null if successful, otherwise error message
-
init
public ResultItem init(weka.attributeSelection.ASEvaluation evaluator, weka.attributeSelection.ASSearch search) throws Exception
Initializes the result item.- Specified by:
init
in classAbstractAttributeSelectionEvaluation
- Parameters:
evaluator
- the current evaluatorsearch
- the current search- Returns:
- the initialized history item
- Throws:
Exception
- if initialization fails
-
doEvaluate
protected void doEvaluate(weka.attributeSelection.ASEvaluation evaluator, weka.attributeSelection.ASSearch search, ResultItem item) throws Exception
Performs attribute selections and updates the result item.- Specified by:
doEvaluate
in classAbstractAttributeSelectionEvaluation
- Parameters:
evaluator
- the current evaluatorsearch
- the current searchitem
- the result item to update- Throws:
Exception
- if evaluation fails
-
update
public void update()
Updates the settings panel.- Specified by:
update
in classAbstractEvaluation<AttributeSelectionTab,ResultItem>
-
activate
public void activate(int index)
Activates the specified dataset.- Specified by:
activate
in classAbstractEvaluation<AttributeSelectionTab,ResultItem>
- Parameters:
index
- the index of the dataset
-
serialize
public Map<String,Object> serialize(Set<AbstractInvestigatorTab.SerializationOption> options)
Returns the objects for serialization.- Overrides:
serialize
in classAbstractEvaluation<AttributeSelectionTab,ResultItem>
- Parameters:
options
- what to serialize- Returns:
- the mapping of the objects to serialize
-
deserialize
public void deserialize(Map<String,Object> data, adams.core.MessageCollection errors)
Restores the objects.- Overrides:
deserialize
in classAbstractEvaluation<AttributeSelectionTab,ResultItem>
- Parameters:
data
- the data to restoreerrors
- for storing errors
-
-