Class IndexedSplitsRunsEvaluation
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.gui.tools.wekainvestigator.evaluation.AbstractEvaluation<ClassifyTab,ResultItem>
-
- adams.gui.tools.wekainvestigator.tab.classifytab.evaluation.AbstractClassifierEvaluation
-
- adams.gui.tools.wekainvestigator.tab.classifytab.evaluation.IndexedSplitsRunsEvaluation
-
- All Implemented Interfaces:
adams.core.GlobalInfoSupporter,adams.core.logging.LoggingSupporter,adams.core.SizeOfHandler,adams.core.StatusMessageHandler,Serializable
public class IndexedSplitsRunsEvaluation extends AbstractClassifierEvaluation
Performs the evaluation according to the provided indexed splits.- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static StringKEY_DATASETstatic StringKEY_FILEstatic StringKEY_LENIENTstatic StringKEY_READERstatic StringKEY_TESTSPLITstatic StringKEY_TRAINSPLITprotected adams.gui.core.BaseCheckBoxm_CheckBoxLenientwhether to be lenient with checks.protected adams.gui.core.BaseComboBox<String>m_ComboBoxDatasetsthe datasets.protected DefaultComboBoxModel<String>m_ModelDatasetsthe datasets model.protected adams.gui.chooser.FileChooserPanelm_PanelFilethe chooser panel for the indexed splits file.protected adams.gui.core.ParameterPanelm_PanelParametersthe panel with the parameters.protected adams.gui.goe.GenericObjectEditorPanelm_PanelReaderthe GOE panel for the indexed splits reader.protected adams.gui.chooser.SelectOptionPanelm_SelectAdditionalAttributesthe additional attributes to store.protected adams.gui.core.BaseTextFieldm_TextTestSplitNamethe text with the name for the test split.protected adams.gui.core.BaseTextFieldm_TextTrainSplitNamethe text with the name for the train split.-
Fields inherited from class adams.gui.tools.wekainvestigator.evaluation.AbstractEvaluation
m_Owner, m_PanelOptions
-
-
Constructor Summary
Constructors Constructor Description IndexedSplitsRunsEvaluation()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidactivate(int index)Activates the specified dataset.StringcanEvaluate(weka.classifiers.Classifier classifier)Tests whether the classifier can be evaluated.voiddeserialize(Map<String,Object> data, adams.core.MessageCollection errors)Restores the objects.protected voiddoEvaluate(weka.classifiers.Classifier classifier, ResultItem item)Evaluates the classifier and updates the result item.StringgetName()Returns the name of the evaluation (displayed in combobox).StringglobalInfo()Returns a string describing the object.ResultIteminit(weka.classifiers.Classifier classifier)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.classifytab.evaluation.AbstractClassifierEvaluation
evaluate, fillWithAttributeNames, getEvaluations, transferAdditionalAttributes
-
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
-
KEY_FILE
public static final String KEY_FILE
- See Also:
- Constant Field Values
-
KEY_READER
public static final String KEY_READER
- See Also:
- Constant Field Values
-
KEY_TRAINSPLIT
public static final String KEY_TRAINSPLIT
- See Also:
- Constant Field Values
-
KEY_TESTSPLIT
public static final String KEY_TESTSPLIT
- See Also:
- Constant Field Values
-
KEY_LENIENT
public static final String KEY_LENIENT
- 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_PanelFile
protected adams.gui.chooser.FileChooserPanel m_PanelFile
the chooser panel for the indexed splits file.
-
m_PanelReader
protected adams.gui.goe.GenericObjectEditorPanel m_PanelReader
the GOE panel for the indexed splits reader.
-
m_TextTrainSplitName
protected adams.gui.core.BaseTextField m_TextTrainSplitName
the text with the name for the train split.
-
m_TextTestSplitName
protected adams.gui.core.BaseTextField m_TextTestSplitName
the text with the name for the test split.
-
m_CheckBoxLenient
protected adams.gui.core.BaseCheckBox m_CheckBoxLenient
whether to be lenient with checks.
-
m_SelectAdditionalAttributes
protected adams.gui.chooser.SelectOptionPanel m_SelectAdditionalAttributes
the additional attributes to store.
-
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<ClassifyTab,ResultItem>
-
getName
public String getName()
Returns the name of the evaluation (displayed in combobox).- Specified by:
getNamein classAbstractEvaluation<ClassifyTab,ResultItem>- Returns:
- the name
-
canEvaluate
public String canEvaluate(weka.classifiers.Classifier classifier)
Tests whether the classifier can be evaluated.- Specified by:
canEvaluatein classAbstractClassifierEvaluation- Returns:
- null if successful, otherwise error message
-
init
public ResultItem init(weka.classifiers.Classifier classifier) throws Exception
Initializes the result item.- Specified by:
initin classAbstractClassifierEvaluation- Parameters:
classifier- the current classifier- Returns:
- the initialized history item
- Throws:
Exception- if initialization fails
-
doEvaluate
protected void doEvaluate(weka.classifiers.Classifier classifier, ResultItem item) throws ExceptionEvaluates the classifier and updates the result item.- Specified by:
doEvaluatein classAbstractClassifierEvaluation- Parameters:
classifier- the current classifieritem- the item to update- Throws:
Exception- if evaluation fails
-
update
public void update()
Updates the settings panel.- Specified by:
updatein classAbstractEvaluation<ClassifyTab,ResultItem>
-
activate
public void activate(int index)
Activates the specified dataset.- Specified by:
activatein classAbstractEvaluation<ClassifyTab,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<ClassifyTab,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:
deserializein classAbstractEvaluation<ClassifyTab,ResultItem>- Parameters:
data- the data to restoreerrors- for storing errors
-
-