Class Train
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.gui.tools.wekainvestigator.evaluation.AbstractEvaluation<AssociateTab,ResultItem>
-
- adams.gui.tools.wekainvestigator.tab.associatetab.evaluation.AbstractAssociatorEvaluation
-
- adams.gui.tools.wekainvestigator.tab.associatetab.evaluation.Train
-
- All Implemented Interfaces:
GlobalInfoSupporter,LoggingSupporter,SizeOfHandler,StatusMessageHandler,Serializable
public class Train extends AbstractAssociatorEvaluation
Builds an associator on a dataset.- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static StringKEY_DATASETprotected BaseComboBox<String>m_ComboBoxDatasetsthe datasets.protected DefaultComboBoxModel<String>m_ModelDatasetsthe datasets model.protected ParameterPanelm_PanelParametersthe panel with the parameters.-
Fields inherited from class adams.gui.tools.wekainvestigator.evaluation.AbstractEvaluation
m_Owner, m_PanelOptions
-
Fields inherited from class adams.core.logging.LoggingObject
m_Logger, m_LoggingIsEnabled, m_LoggingLevel
-
-
Constructor Summary
Constructors Constructor Description Train()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidactivate(int index)Activates the specified dataset.StringcanEvaluate(weka.associations.Associator associator)Tests whether the associator can be evaluated.voiddeserialize(Map<String,Object> data, MessageCollection errors)Restores the objects.protected voiddoEvaluate(weka.associations.Associator associator, ResultItem item)Evaluates the associator and updates the result item.StringgetName()Returns the name of the evaluation (displayed in combobox).StringglobalInfo()Returns a string describing the object.ResultIteminit(weka.associations.Associator associator)Initializes the result item.protected voidinitGUI()Initializes the widgets.Map<String,Object>serialize(Set<AbstractInvestigatorTab.SerializationOption> options)Returns the objects for serialization.voidupdate()Updates the settings panel.-
Methods inherited from class adams.gui.tools.wekainvestigator.tab.associatetab.evaluation.AbstractAssociatorEvaluation
evaluate, getEvaluations
-
Methods inherited from class adams.gui.tools.wekainvestigator.evaluation.AbstractEvaluation
addObjectSize, addToHistory, getOwner, getPanel, getProperties, getTestingUpdateInterval, initialize, isValidDataIndex, listOrArray, setOwner, showStatus, toString
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
-
-
-
Field Detail
-
KEY_DATASET
public static final String KEY_DATASET
- See Also:
- Constant Field Values
-
m_PanelParameters
protected ParameterPanel m_PanelParameters
the panel with the parameters.
-
m_ComboBoxDatasets
protected 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:
initGUIin classAbstractEvaluation<AssociateTab,ResultItem>
-
getName
public String getName()
Returns the name of the evaluation (displayed in combobox).- Specified by:
getNamein classAbstractEvaluation<AssociateTab,ResultItem>- Returns:
- the name
-
canEvaluate
public String canEvaluate(weka.associations.Associator associator)
Tests whether the associator can be evaluated.- Specified by:
canEvaluatein classAbstractAssociatorEvaluation- Parameters:
associator- the current associator- Returns:
- null if successful, otherwise error message
-
init
public ResultItem init(weka.associations.Associator associator) throws Exception
Initializes the result item.- Specified by:
initin classAbstractAssociatorEvaluation- Parameters:
associator- the current associator- Returns:
- the initialized history item
- Throws:
Exception- if initialization fails
-
doEvaluate
protected void doEvaluate(weka.associations.Associator associator, ResultItem item) throws ExceptionEvaluates the associator and updates the result item.- Specified by:
doEvaluatein classAbstractAssociatorEvaluation- Parameters:
associator- the current associatoritem- the item to update- Throws:
Exception- if evaluation fails
-
update
public void update()
Updates the settings panel.- Specified by:
updatein classAbstractEvaluation<AssociateTab,ResultItem>
-
activate
public void activate(int index)
Activates the specified dataset.- Specified by:
activatein classAbstractEvaluation<AssociateTab,ResultItem>- Parameters:
index- the index of the dataset
-
serialize
public Map<String,Object> serialize(Set<AbstractInvestigatorTab.SerializationOption> options)
Returns the objects for serialization.- Overrides:
serializein classAbstractEvaluation<AssociateTab,ResultItem>- Parameters:
options- what to serialize- Returns:
- the mapping of the objects to serialize
-
deserialize
public void deserialize(Map<String,Object> data, MessageCollection errors)
Restores the objects.- Overrides:
deserializein classAbstractEvaluation<AssociateTab,ResultItem>- Parameters:
data- the data to restoreerrors- for storing errors
-
-