Class ResultItem
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.gui.tools.wekainvestigator.output.AbstractResultItem
-
- adams.gui.tools.wekainvestigator.output.AbstractNestableResultItem
-
- adams.gui.tools.wekainvestigator.tab.classifytab.ResultItem
-
- All Implemented Interfaces:
adams.core.CleanUpHandler
,adams.core.logging.LoggingSupporter
,adams.core.SizeOfHandler
,Serializable
public class ResultItem extends AbstractNestableResultItem
Container for an evaluation, model, training set header. Used in the result history.- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected adams.data.spreadsheet.SpreadSheet
m_AdditionalAttributes
additional attributes.protected weka.classifiers.Evaluation
m_Evaluation
the evaluation object.protected weka.classifiers.Evaluation[]
m_FoldEvaluations
the evaluation objects from the folds.protected weka.classifiers.Classifier[]
m_FoldModels
the fold models.protected weka.classifiers.Classifier
m_Model
the model.protected int[]
m_OriginalIndices
the original indices.protected weka.classifiers.Evaluation[]
m_RunEvaluations
the evaluation objects from the runs.protected adams.data.spreadsheet.MetaData
m_RunInformation
the run information.protected weka.classifiers.Classifier[]
m_RunModels
the run models.protected int[][]
m_RunOriginalIndices
the original indices (runs).protected weka.classifiers.Classifier
m_Template
the template.-
Fields inherited from class adams.gui.tools.wekainvestigator.output.AbstractNestableResultItem
m_NameSuffix, m_NestedItems
-
Fields inherited from class adams.gui.tools.wekainvestigator.output.AbstractResultItem
m_Header, m_Log, m_LogPanel, m_Name, m_TabbedPane, m_Timestamp, MAX_RELATIONNAME_LENGTH
-
-
Constructor Summary
Constructors Constructor Description ResultItem(weka.classifiers.Classifier template, weka.core.Instances header)
Initializes the item.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected String
createName()
Creates the name from the members.adams.data.spreadsheet.SpreadSheet
getAdditionalAttributes()
Returns the stored additional attributes data.weka.classifiers.Evaluation
getEvaluation()
Returns the stored Evaluation object.weka.classifiers.Evaluation[]
getFoldEvaluations()
Returns the stored Evaluation objects per fold.weka.classifiers.Classifier[]
getFoldModels()
Returns the stored Classifier objects per fold.weka.classifiers.Classifier
getModel()
Returns the stored model object.int[]
getOriginalIndices()
Returns the stored original indices.weka.classifiers.Evaluation[]
getRunEvaluations()
Returns the stored Evaluation objects per run.adams.data.spreadsheet.MetaData
getRunInformation()
Returns the stored run information.weka.classifiers.Classifier[]
getRunModels()
Returns the stored Classifier objects per run.int[][]
getRunOriginalIndices()
Returns the stored original indices per run.weka.classifiers.Classifier
getTemplate()
Returns the stored template object.boolean
hasAdditionalAttributes()
Returns whether additional attributes data is present.boolean
hasEvaluation()
Returns whether an Evaluation object is present.boolean
hasFoldEvaluations()
Returns whether Evaluation objects per fold are present.boolean
hasFoldModels()
Returns whether Classifier objects per fold are present.boolean
hasModel()
Returns whether an model object is present.boolean
hasOriginalIndices()
Returns whether the original indices are present.boolean
hasRunEvaluations()
Returns whether Evaluation objects per run are present.boolean
hasRunInformation()
Returns whether run information is present.boolean
hasRunModels()
Returns whether Classifier objects per run are present.boolean
hasRunOriginalIndices()
Returns whether the original indices per run are present.void
setAdditionalAttributes(adams.data.spreadsheet.SpreadSheet value)
Sets the additional attributes data.void
setModel(weka.classifiers.Classifier value)
Sets the model to make available.void
setTemplate(weka.classifiers.Classifier value)
Sets the stored template object.String
toString()
Returns a short description of the container.void
update(weka.classifiers.Evaluation evaluation, weka.classifiers.Classifier model)
Updates the item.void
update(weka.classifiers.Evaluation evaluation, weka.classifiers.Classifier model, adams.data.spreadsheet.MetaData runInfo)
Updates the item.void
update(weka.classifiers.Evaluation evaluation, weka.classifiers.Classifier model, adams.data.spreadsheet.MetaData runInfo, int[] original, adams.data.spreadsheet.SpreadSheet additional)
Updates the item.void
update(weka.classifiers.Evaluation evaluation, weka.classifiers.Evaluation[] foldEvaluations, weka.classifiers.Classifier model, weka.classifiers.Classifier[] foldModels, adams.data.spreadsheet.MetaData runInfo, int[] original, adams.data.spreadsheet.SpreadSheet additional)
Updates the item.void
update(weka.classifiers.Evaluation evaluation, weka.classifiers.Evaluation[] foldEvaluations, weka.classifiers.Evaluation[] runEvaluations, weka.classifiers.Classifier model, weka.classifiers.Classifier[] foldModels, weka.classifiers.Classifier[] runModels, adams.data.spreadsheet.MetaData runInfo, int[] original, int[][] runOriginals, adams.data.spreadsheet.SpreadSheet additional)
Updates the item.-
Methods inherited from class adams.gui.tools.wekainvestigator.output.AbstractNestableResultItem
addNestedItem, cleanUp, getNameSuffix, getNestedItem, hasNestedItems, nestedItemNames, setNameSuffix
-
Methods inherited from class adams.gui.tools.wekainvestigator.output.AbstractResultItem
getHeader, getLogPanel, getName, getTabbedPane, hasHeader, invalidateName, logError, logMessage
-
-
-
-
Field Detail
-
m_Evaluation
protected weka.classifiers.Evaluation m_Evaluation
the evaluation object.
-
m_FoldEvaluations
protected weka.classifiers.Evaluation[] m_FoldEvaluations
the evaluation objects from the folds.
-
m_RunEvaluations
protected weka.classifiers.Evaluation[] m_RunEvaluations
the evaluation objects from the runs.
-
m_Template
protected weka.classifiers.Classifier m_Template
the template.
-
m_Model
protected weka.classifiers.Classifier m_Model
the model.
-
m_FoldModels
protected weka.classifiers.Classifier[] m_FoldModels
the fold models.
-
m_RunModels
protected weka.classifiers.Classifier[] m_RunModels
the run models.
-
m_RunInformation
protected adams.data.spreadsheet.MetaData m_RunInformation
the run information.
-
m_OriginalIndices
protected int[] m_OriginalIndices
the original indices.
-
m_RunOriginalIndices
protected int[][] m_RunOriginalIndices
the original indices (runs).
-
m_AdditionalAttributes
protected adams.data.spreadsheet.SpreadSheet m_AdditionalAttributes
additional attributes.
-
-
Method Detail
-
createName
protected String createName()
Creates the name from the members.- Specified by:
createName
in classAbstractResultItem
- Returns:
- the name
-
update
public void update(weka.classifiers.Evaluation evaluation, weka.classifiers.Classifier model)
Updates the item.- Parameters:
evaluation
- the evaluation, can be nullmodel
- the model, can be null
-
update
public void update(weka.classifiers.Evaluation evaluation, weka.classifiers.Classifier model, adams.data.spreadsheet.MetaData runInfo)
Updates the item.- Parameters:
evaluation
- the evaluation, can be nullmodel
- the model, can be nullrunInfo
- the meta-data for the run
-
update
public void update(weka.classifiers.Evaluation evaluation, weka.classifiers.Classifier model, adams.data.spreadsheet.MetaData runInfo, int[] original, adams.data.spreadsheet.SpreadSheet additional)
Updates the item.- Parameters:
evaluation
- the evaluation, can be nullmodel
- the model, can be nullrunInfo
- the meta-data for the runoriginal
- the original indices, can be nulladditional
- the additional attributes, can be null
-
update
public void update(weka.classifiers.Evaluation evaluation, weka.classifiers.Evaluation[] foldEvaluations, weka.classifiers.Classifier model, weka.classifiers.Classifier[] foldModels, adams.data.spreadsheet.MetaData runInfo, int[] original, adams.data.spreadsheet.SpreadSheet additional)
Updates the item.- Parameters:
evaluation
- the evaluation, can be nullfoldEvaluations
- the evaluations per fold, can be nullmodel
- the model, can be nullfoldModels
- the models per fold, can be nullrunInfo
- the meta-data for the runoriginal
- the original indices, can be nulladditional
- the additional attributes, can be null
-
update
public void update(weka.classifiers.Evaluation evaluation, weka.classifiers.Evaluation[] foldEvaluations, weka.classifiers.Evaluation[] runEvaluations, weka.classifiers.Classifier model, weka.classifiers.Classifier[] foldModels, weka.classifiers.Classifier[] runModels, adams.data.spreadsheet.MetaData runInfo, int[] original, int[][] runOriginals, adams.data.spreadsheet.SpreadSheet additional)
Updates the item.- Parameters:
evaluation
- the evaluation, can be nullfoldEvaluations
- the evaluations per fold, can be nullrunEvaluations
- the evaluations per run, can be nullmodel
- the model, can be nullfoldModels
- the models per fold, can be nullrunModels
- the models per run, can be nullrunInfo
- the meta-data for the runoriginal
- the original indices, can be nullrunOriginals
- the original indices per run, can be nulladditional
- the additional attributes, can be null
-
hasEvaluation
public boolean hasEvaluation()
Returns whether an Evaluation object is present.- Returns:
- true if available
-
getEvaluation
public weka.classifiers.Evaluation getEvaluation()
Returns the stored Evaluation object.- Returns:
- the evaluation, null if not present
-
hasFoldEvaluations
public boolean hasFoldEvaluations()
Returns whether Evaluation objects per fold are present.- Returns:
- true if available
-
getFoldEvaluations
public weka.classifiers.Evaluation[] getFoldEvaluations()
Returns the stored Evaluation objects per fold.- Returns:
- the evaluations per fold, null if not present
-
hasRunEvaluations
public boolean hasRunEvaluations()
Returns whether Evaluation objects per run are present.- Returns:
- true if available
-
getRunEvaluations
public weka.classifiers.Evaluation[] getRunEvaluations()
Returns the stored Evaluation objects per run.- Returns:
- the evaluations per run, null if not present
-
setTemplate
public void setTemplate(weka.classifiers.Classifier value)
Sets the stored template object.- Parameters:
value
- the template
-
getTemplate
public weka.classifiers.Classifier getTemplate()
Returns the stored template object.- Returns:
- the template
-
hasModel
public boolean hasModel()
Returns whether an model object is present.- Returns:
- true if available
-
setModel
public void setModel(weka.classifiers.Classifier value)
Sets the model to make available.- Parameters:
value
- the model
-
getModel
public weka.classifiers.Classifier getModel()
Returns the stored model object.- Returns:
- the model, null if not present
-
hasFoldModels
public boolean hasFoldModels()
Returns whether Classifier objects per fold are present.- Returns:
- true if available
-
getFoldModels
public weka.classifiers.Classifier[] getFoldModels()
Returns the stored Classifier objects per fold.- Returns:
- the classifiers per fold, null if not present
-
hasRunModels
public boolean hasRunModels()
Returns whether Classifier objects per run are present.- Returns:
- true if available
-
getRunModels
public weka.classifiers.Classifier[] getRunModels()
Returns the stored Classifier objects per run.- Returns:
- the classifiers per run, null if not present
-
hasRunInformation
public boolean hasRunInformation()
Returns whether run information is present.- Returns:
- true if available
-
getRunInformation
public adams.data.spreadsheet.MetaData getRunInformation()
Returns the stored run information.- Returns:
- the information, null if not present
-
hasOriginalIndices
public boolean hasOriginalIndices()
Returns whether the original indices are present.- Returns:
- true if available
-
getOriginalIndices
public int[] getOriginalIndices()
Returns the stored original indices.- Returns:
- the indices, null if not present
-
hasRunOriginalIndices
public boolean hasRunOriginalIndices()
Returns whether the original indices per run are present.- Returns:
- true if available
-
getRunOriginalIndices
public int[][] getRunOriginalIndices()
Returns the stored original indices per run.- Returns:
- the indices, null if not present
-
hasAdditionalAttributes
public boolean hasAdditionalAttributes()
Returns whether additional attributes data is present.- Returns:
- true if available
-
setAdditionalAttributes
public void setAdditionalAttributes(adams.data.spreadsheet.SpreadSheet value)
Sets the additional attributes data.- Parameters:
value
- the data, null if not present
-
getAdditionalAttributes
public adams.data.spreadsheet.SpreadSheet getAdditionalAttributes()
Returns the stored additional attributes data.- Returns:
- the data, null if not present
-
toString
public String toString()
Returns a short description of the container.- Specified by:
toString
in classAbstractResultItem
- Returns:
- the description
-
-