Class AbstractEvaluation<T extends AbstractInvestigatorTab,R extends AbstractResultItem>
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.gui.tools.wekainvestigator.evaluation.AbstractEvaluation<T,R>
-
- All Implemented Interfaces:
adams.core.GlobalInfoSupporter
,adams.core.logging.LoggingSupporter
,adams.core.SizeOfHandler
,adams.core.StatusMessageHandler
,Serializable
- Direct Known Subclasses:
AbstractAssociatorEvaluation
,AbstractAttributeSelectionEvaluation
,AbstractClassifierEvaluation
,AbstractClustererEvaluation
,AbstractExperimentSetup
public abstract class AbstractEvaluation<T extends AbstractInvestigatorTab,R extends AbstractResultItem> extends adams.core.logging.LoggingObject implements adams.core.StatusMessageHandler, adams.core.GlobalInfoSupporter
Ancestor for evaluation setups.- Version:
- $Revision$
- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected T
m_Owner
the owner.protected JPanel
m_PanelOptions
the panel with the options.
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractEvaluation()
Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract void
activate(int index)
Activates the specified dataset.void
addObjectSize(adams.data.spreadsheet.MetaData meta, String key, Object obj)
Adds the object size to the meta-data.R
addToHistory(adams.gui.core.AbstractNamedHistoryPanel<R> history, R item)
Adds the item to the history and selects it.void
deserialize(Map<String,Object> data, adams.core.MessageCollection errors)
Restores the objects.abstract String
getName()
Returns the name of the evaluation (displayed in combobox).T
getOwner()
Returns the owner.JPanel
getPanel()
Returns a panel with options to display.static adams.core.Properties
getProperties()
Returns the properties that define the editor.protected int
getTestingUpdateInterval()
Returns the interval to use for outputting progress info during testing.protected void
initGUI()
Initializes the panel.protected void
initialize()
Initializes the members.protected boolean
isValidDataIndex(adams.gui.core.BaseComboBox combobox)
Checks whether the combobox selection index is a valid dataset index.protected String[]
listOrArray(Object obj)
If the object should be a list of strings instead of an array of strings, then it gets converted accordingly.Map<String,Object>
serialize(Set<AbstractInvestigatorTab.SerializationOption> options)
Returns the objects for serialization.void
setOwner(T value)
Sets the owner.void
showStatus(String msg)
Displays a message.String
toString()
Returns just the name of the evaluation.abstract void
update()
Updates the settings panel.-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
-
-
-
Field Detail
-
m_Owner
protected T extends AbstractInvestigatorTab m_Owner
the owner.
-
m_PanelOptions
protected JPanel m_PanelOptions
the panel with the options.
-
-
Method Detail
-
initialize
protected void initialize()
Initializes the members.
-
initGUI
protected void initGUI()
Initializes the panel.
-
setOwner
public void setOwner(T value)
Sets the owner.- Parameters:
value
- the owning tab
-
getOwner
public T getOwner()
Returns the owner.- Returns:
- the owning tab, null if none set
-
getName
public abstract String getName()
Returns the name of the evaluation (displayed in combobox).- Returns:
- the name
-
getPanel
public JPanel getPanel()
Returns a panel with options to display.- Returns:
- the panel
-
getTestingUpdateInterval
protected int getTestingUpdateInterval()
Returns the interval to use for outputting progress info during testing.- Returns:
- the interval
-
addToHistory
public R addToHistory(adams.gui.core.AbstractNamedHistoryPanel<R> history, R item)
Adds the item to the history and selects it.- Parameters:
item
- the item to add- Returns:
- the item
-
toString
public String toString()
Returns just the name of the evaluation.
-
update
public abstract void update()
Updates the settings panel.
-
activate
public abstract void activate(int index)
Activates the specified dataset.- Parameters:
index
- the index of the dataset
-
showStatus
public void showStatus(String msg)
Displays a message.- Specified by:
showStatus
in interfaceadams.core.StatusMessageHandler
- Parameters:
msg
- the message to display
-
isValidDataIndex
protected boolean isValidDataIndex(adams.gui.core.BaseComboBox combobox)
Checks whether the combobox selection index is a valid dataset index.- Parameters:
combobox
- the combobox to check- Returns:
- true if valid index
-
addObjectSize
public void addObjectSize(adams.data.spreadsheet.MetaData meta, String key, Object obj)
Adds the object size to the meta-data.- Parameters:
meta
- the meta-data to add the information tokey
- the key for the meta-data to useobj
- the object to determine the size for
-
serialize
public Map<String,Object> serialize(Set<AbstractInvestigatorTab.SerializationOption> options)
Returns the objects for serialization.- Parameters:
options
- what to serialize- Returns:
- the mapping of the objects to serialize
-
listOrArray
protected String[] listOrArray(Object obj)
If the object should be a list of strings instead of an array of strings, then it gets converted accordingly.- Parameters:
obj
- the list/array- Returns:
- the generated array
-
deserialize
public void deserialize(Map<String,Object> data, adams.core.MessageCollection errors)
Restores the objects.- Parameters:
data
- the data to restoreerrors
- for storing errors
-
getProperties
public static adams.core.Properties getProperties()
Returns the properties that define the editor.- Returns:
- the properties
-
-