Class AbstractCategoricalSummaryStatistic
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.flow.transformer.summarystatistics.AbstractSummaryStatistic
-
- adams.flow.transformer.summarystatistics.AbstractCategoricalSummaryStatistic
-
- All Implemented Interfaces:
Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,SizeOfHandler
,CategoricalSummaryStatistic
,SummaryStatistic
,Serializable
- Direct Known Subclasses:
Accuracy
public abstract class AbstractCategoricalSummaryStatistic extends AbstractSummaryStatistic implements CategoricalSummaryStatistic
Ancestor for summary statistics that work with numeric predictions.- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected String[]
m_CategoricalActual
the actual values.protected String[]
m_CategoricalClassDistributionLabels
the class distribution labels (required if distributions provided).protected double[][]
m_CategoricalClassDistributions
the class distributions (optional).protected String[]
m_CategoricalPredicted
the predicted values.protected double[]
m_CategoricalProbabilities
the probabilities (optional).-
Fields inherited from class adams.core.option.AbstractOptionHandler
m_OptionManager
-
Fields inherited from class adams.core.logging.LoggingObject
m_Logger, m_LoggingIsEnabled, m_LoggingLevel
-
Fields inherited from interface adams.flow.transformer.summarystatistics.CategoricalSummaryStatistic
MISSING_CATEGORICAL
-
-
Constructor Summary
Constructors Constructor Description AbstractCategoricalSummaryStatistic()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected String
check()
Hook method for performing checks before calculating statistic.void
clear()
Clears all input.String[]
getCategoricalActual()
Returns the actual values.String[]
getCategoricalClassDistributionLabels()
Returns the class distributions values.double[][]
getCategoricalClassDistributions()
Returns the class distributions values.String[]
getCategoricalPredicted()
Returns the predicted values.double[]
getCategoricalProbabilities()
Returns the probabilities.void
setCategoricalActual(String[] value)
Sets the actual values.void
setCategoricalClassDistributionLabels(String[] value)
Sets the class labels (order in the class distributions).void
setCategoricalClassDistributions(double[][] value)
Sets the class distributions.void
setCategoricalPredicted(String[] value)
Sets the predicted values.void
setCategoricalProbabilities(double[] value)
Sets the probabilities.-
Methods inherited from class adams.flow.transformer.summarystatistics.AbstractSummaryStatistic
calculate, doCalculate
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, defineOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, globalInfo, initialize, loggingLevelTipText, newOptionManager, reset, setLoggingLevel, toCommandLine, toString
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel
-
Methods inherited from interface adams.flow.transformer.summarystatistics.SummaryStatistic
calculate, getNames
-
-
-
-
Field Detail
-
m_CategoricalActual
protected String[] m_CategoricalActual
the actual values.
-
m_CategoricalPredicted
protected String[] m_CategoricalPredicted
the predicted values.
-
m_CategoricalProbabilities
protected double[] m_CategoricalProbabilities
the probabilities (optional).
-
m_CategoricalClassDistributions
protected double[][] m_CategoricalClassDistributions
the class distributions (optional).
-
m_CategoricalClassDistributionLabels
protected String[] m_CategoricalClassDistributionLabels
the class distribution labels (required if distributions provided).
-
-
Method Detail
-
clear
public void clear()
Clears all input.- Specified by:
clear
in interfaceSummaryStatistic
- Overrides:
clear
in classAbstractSummaryStatistic
-
setCategoricalActual
public void setCategoricalActual(String[] value)
Sets the actual values.- Specified by:
setCategoricalActual
in interfaceCategoricalSummaryStatistic
- Parameters:
value
- the actual
-
getCategoricalActual
public String[] getCategoricalActual()
Returns the actual values.- Specified by:
getCategoricalActual
in interfaceCategoricalSummaryStatistic
- Returns:
- the actual
-
setCategoricalPredicted
public void setCategoricalPredicted(String[] value)
Sets the predicted values.- Specified by:
setCategoricalPredicted
in interfaceCategoricalSummaryStatistic
- Parameters:
value
- the predicted
-
getCategoricalPredicted
public String[] getCategoricalPredicted()
Returns the predicted values.- Specified by:
getCategoricalPredicted
in interfaceCategoricalSummaryStatistic
- Returns:
- the predicted
-
setCategoricalProbabilities
public void setCategoricalProbabilities(double[] value)
Sets the probabilities.- Specified by:
setCategoricalProbabilities
in interfaceCategoricalSummaryStatistic
- Parameters:
value
- the probabilities
-
getCategoricalProbabilities
public double[] getCategoricalProbabilities()
Returns the probabilities.- Specified by:
getCategoricalProbabilities
in interfaceCategoricalSummaryStatistic
- Returns:
- the probabilities
-
setCategoricalClassDistributions
public void setCategoricalClassDistributions(double[][] value)
Sets the class distributions.- Specified by:
setCategoricalClassDistributions
in interfaceCategoricalSummaryStatistic
- Parameters:
value
- the class distributions
-
getCategoricalClassDistributions
public double[][] getCategoricalClassDistributions()
Returns the class distributions values.- Specified by:
getCategoricalClassDistributions
in interfaceCategoricalSummaryStatistic
- Returns:
- the class distributions
-
setCategoricalClassDistributionLabels
public void setCategoricalClassDistributionLabels(String[] value)
Sets the class labels (order in the class distributions).- Specified by:
setCategoricalClassDistributionLabels
in interfaceCategoricalSummaryStatistic
- Parameters:
value
- the class distribution labels
-
getCategoricalClassDistributionLabels
public String[] getCategoricalClassDistributionLabels()
Returns the class distributions values.- Specified by:
getCategoricalClassDistributionLabels
in interfaceCategoricalSummaryStatistic
- Returns:
- the class distribution labels
-
check
protected String check()
Hook method for performing checks before calculating statistic.- Overrides:
check
in classAbstractSummaryStatistic
- Returns:
- null if successful, otherwise error message
-
-