Package adams.flow.transformer
Class SummaryStatistics
-
- All Implemented Interfaces:
AdditionalInformationHandler,CleanUpHandler,Destroyable,GlobalInfoSupporter,LoggingLevelHandler,LoggingSupporter,OptionHandler,QuickInfoSupporter,ShallowCopySupporter<Actor>,SizeOfHandler,Stoppable,StoppableWithFeedback,VariablesInspectionHandler,VariableChangeListener,Actor,ErrorHandler,InputConsumer,OutputProducer,Serializable,Comparable
public class SummaryStatistics extends AbstractSpreadSheetTransformer
Calculates the selected summary statistics and outputs a spreadsheet.
Input/output:
- accepts:
adams.data.spreadsheet.SpreadSheet
- generates:
adams.data.spreadsheet.SpreadSheet
-logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel) The logging level for outputting errors and debugging output. default: WARNING
-name <java.lang.String> (property: name) The name of the actor. default: SummaryStatistics
-annotation <adams.core.base.BaseAnnotation> (property: annotations) The annotations to attach to this actor. default:
-skip <boolean> (property: skip) If set to true, transformation is skipped and the input token is just forwarded as it is. default: false
-stop-flow-on-error <boolean> (property: stopFlowOnError) If set to true, the flow execution at this level gets stopped in case this actor encounters an error; the error gets propagated; useful for critical actors. default: false
-silent <boolean> (property: silent) If enabled, then no errors are output in the console; Note: the enclosing actor handler must have this enabled as well. default: false
-actual-column <adams.data.spreadsheet.SpreadSheetColumnIndex> (property: actualColumn) The column with the actual labels. default: 1 example: An index is a number starting with 1; column names (case-sensitive) as well as the following placeholders can be used: first, second, third, last_2, last_1, last; numeric indices can be enforced by preceding them with '#' (eg '#12'); column names can be surrounded by double quotes.
-actual-prefix <java.lang.String> (property: actualPrefix) The prefix for the actual labels. default: a:
-predicted-column <adams.data.spreadsheet.SpreadSheetColumnIndex> (property: predictedColumn) The column with the predicted labels. default: 2 example: An index is a number starting with 1; column names (case-sensitive) as well as the following placeholders can be used: first, second, third, last_2, last_1, last; numeric indices can be enforced by preceding them with '#' (eg '#12'); column names can be surrounded by double quotes.
-predicted-prefix <java.lang.String> (property: predictedPrefix) The prefix for the predicted labels. default: p:
-probability-column <adams.data.spreadsheet.SpreadSheetColumnIndex> (property: probabilityColumn) The (optional) column with the probabilities; if not available probability of 1 is assumed. default: example: An index is a number starting with 1; column names (case-sensitive) as well as the following placeholders can be used: first, second, third, last_2, last_1, last; numeric indices can be enforced by preceding them with '#' (eg '#12'); column names can be surrounded by double quotes.
-class-distribution-range <adams.data.spreadsheet.SpreadSheetColumnRange> (property: classDistributionRange) The (optional) columns with the class distributions; if not available probability of 1 is assumed for predicted label. default: example: A range is a comma-separated list of single 1-based indices or sub-ranges of indices ('start-end'); 'inv(...)' inverts the range '...'; column names (case-sensitive) as well as the following placeholders can be used: first, second, third, last_2, last_1, last; numeric indices can be enforced by preceding them with '#' (eg '#12'); column names can be surrounded by double quotes.-statistic <adams.flow.transformer.summarystatistics.SummaryStatistic> [-statistic ...] (property: statistics) The statistics to compute. default:
- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected SpreadSheetColumnIndexm_ActualColumnthe column with the actual labels.protected Stringm_ActualPrefixthe optional prefix for the actual labels.protected SpreadSheetColumnRangem_ClassDistributionRangethe column with the class distribution.protected SpreadSheetColumnIndexm_PredictedColumnthe column with the predicted labels.protected Stringm_PredictedPrefixthe optional prefix for the predicted labels.protected SpreadSheetColumnIndexm_ProbabilityColumnthe column with the probabilities.protected SummaryStatistic[]m_Statisticsthe statistics.-
Fields inherited from class adams.flow.transformer.AbstractTransformer
BACKUP_INPUT, BACKUP_OUTPUT, m_InputToken, m_OutputToken
-
Fields inherited from class adams.flow.core.AbstractActor
m_Annotations, m_BackupState, m_DetectedObjectVariables, m_DetectedVariables, m_ErrorHandler, m_Executed, m_Executing, m_ExecutionListeningSupporter, m_FullName, m_LoggingPrefix, m_Name, m_Parent, m_ScopeHandler, m_Self, m_Silent, m_Skip, m_StopFlowOnError, m_StopMessage, m_Stopped, m_StorageHandler, m_VariablesUpdated
-
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.core.Actor
FILE_EXTENSION, FILE_EXTENSION_GZ
-
-
Constructor Summary
Constructors Constructor Description SummaryStatistics()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringactualColumnTipText()Returns the tip text for this property.StringactualPrefixTipText()Returns the tip text for this property.StringclassDistributionRangeTipText()Returns the tip text for this property.voiddefineOptions()Adds options to the internal list of options.protected StringdoExecute()Executes the flow item.SpreadSheetColumnIndexgetActualColumn()Returns the column of the actual labels.StringgetActualPrefix()Returns the prefix of the actual labels.SpreadSheetColumnRangegetClassDistributionRange()Returns the columns with the class distributions (optional).SpreadSheetColumnIndexgetPredictedColumn()Returns the column of the predicted labels.StringgetPredictedPrefix()Returns the prefix of the predicted labels.SpreadSheetColumnIndexgetProbabilityColumn()Returns the column with the probabilities (optional).StringgetQuickInfo()Returns a quick info about the actor, which will be displayed in the GUI.SummaryStatistic[]getStatistics()Returns the statistics to calculate.StringglobalInfo()Returns a string describing the object.StringpredictedColumnTipText()Returns the tip text for this property.StringpredictedPrefixTipText()Returns the tip text for this property.StringprobabilityColumnTipText()Returns the tip text for this property.voidsetActualColumn(SpreadSheetColumnIndex value)Sets the column of the actual labels.voidsetActualPrefix(String value)Sets the prefix of the actual labels.voidsetClassDistributionRange(SpreadSheetColumnRange value)Sets the columns with the class distributions (optional).voidsetPredictedColumn(SpreadSheetColumnIndex value)Sets the column of the predicted labels.voidsetPredictedPrefix(String value)Sets the prefix of the predicted labels.voidsetProbabilityColumn(SpreadSheetColumnIndex value)Sets the column with the probabilities (optional).voidsetStatistics(SummaryStatistic[] value)Sets the statistics to calculate.StringstatisticsTipText()Returns the tip text for this property.-
Methods inherited from class adams.flow.transformer.AbstractSpreadSheetTransformer
accepts, generates
-
Methods inherited from class adams.flow.transformer.AbstractTransformer
backupState, currentInput, execute, hasInput, hasPendingOutput, input, output, postExecute, restoreState, wrapUp
-
Methods inherited from class adams.flow.core.AbstractActor
annotationsTipText, canInspectOptions, canPerformSetUpCheck, cleanUp, compareTo, configureLogger, destroy, equals, finalUpdateVariables, findVariables, findVariables, forceVariables, forCommandLine, forName, forName, getAdditionalInformation, getAnnotations, getDefaultName, getDetectedVariables, getErrorHandler, getFlowActors, getFlowExecutionListeningSupporter, getFullName, getName, getNextSibling, getParent, getParentComponent, getPreviousSibling, getRoot, getScopeHandler, getSilent, getSkip, getStopFlowOnError, getStopMessage, getStorageHandler, getVariables, handleError, handleException, hasErrorHandler, hasStopMessage, index, initialize, isBackedUp, isExecuted, isExecuting, isFinished, isHeadless, isStopped, nameTipText, performSetUpChecks, performVariableChecks, preExecute, pruneBackup, pruneBackup, reset, setAnnotations, setErrorHandler, setName, setParent, setSilent, setSkip, setStopFlowOnError, setUp, setVariables, shallowCopy, shallowCopy, silentTipText, sizeOf, skipTipText, stopExecution, stopExecution, stopFlowOnErrorTipText, updateDetectedVariables, updatePrefix, updateVariables, variableChanged
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, finishInit, getDefaultLoggingLevel, getOptionManager, loggingLevelTipText, newOptionManager, setLoggingLevel, toCommandLine, toString
-
Methods inherited from class adams.core.logging.LoggingObject
getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface adams.flow.core.Actor
cleanUp, compareTo, destroy, equals, findVariables, getAnnotations, getDefaultName, getDetectedVariables, getErrorHandler, getFlowExecutionListeningSupporter, getFullName, getName, getNextSibling, getParent, getParentComponent, getPreviousSibling, getRoot, getScopeHandler, getSilent, getSkip, getStopFlowOnError, getStopMessage, getStorageHandler, getVariables, handleError, hasErrorHandler, hasStopMessage, index, isExecuted, isFinished, isHeadless, isStopped, setAnnotations, setErrorHandler, setName, setParent, setSilent, setSkip, setStopFlowOnError, setUp, setVariables, shallowCopy, shallowCopy, sizeOf, stopExecution, stopExecution, toCommandLine, variableChanged
-
Methods inherited from interface adams.core.AdditionalInformationHandler
getAdditionalInformation
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel, setLoggingLevel
-
Methods inherited from interface adams.core.logging.LoggingSupporter
getLogger, isLoggingEnabled
-
Methods inherited from interface adams.core.option.OptionHandler
cleanUpOptions, getOptionManager
-
Methods inherited from interface adams.core.VariablesInspectionHandler
canInspectOptions
-
-
-
-
Field Detail
-
m_ActualColumn
protected SpreadSheetColumnIndex m_ActualColumn
the column with the actual labels.
-
m_ActualPrefix
protected String m_ActualPrefix
the optional prefix for the actual labels.
-
m_PredictedColumn
protected SpreadSheetColumnIndex m_PredictedColumn
the column with the predicted labels.
-
m_PredictedPrefix
protected String m_PredictedPrefix
the optional prefix for the predicted labels.
-
m_ProbabilityColumn
protected SpreadSheetColumnIndex m_ProbabilityColumn
the column with the probabilities.
-
m_ClassDistributionRange
protected SpreadSheetColumnRange m_ClassDistributionRange
the column with the class distribution.
-
m_Statistics
protected SummaryStatistic[] m_Statistics
the statistics.
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfoin interfaceGlobalInfoSupporter- Specified by:
globalInfoin classAbstractOptionHandler- Returns:
- a description suitable for displaying in the gui
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptionsin interfaceOptionHandler- Overrides:
defineOptionsin classAbstractActor
-
getQuickInfo
public String getQuickInfo()
Returns a quick info about the actor, which will be displayed in the GUI.- Specified by:
getQuickInfoin interfaceActor- Specified by:
getQuickInfoin interfaceQuickInfoSupporter- Overrides:
getQuickInfoin classAbstractActor- Returns:
- null if no info available, otherwise short string
-
setActualColumn
public void setActualColumn(SpreadSheetColumnIndex value)
Sets the column of the actual labels.- Parameters:
value- the index
-
getActualColumn
public SpreadSheetColumnIndex getActualColumn()
Returns the column of the actual labels.- Returns:
- the index
-
actualColumnTipText
public String actualColumnTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setActualPrefix
public void setActualPrefix(String value)
Sets the prefix of the actual labels.- Parameters:
value- the prefix
-
getActualPrefix
public String getActualPrefix()
Returns the prefix of the actual labels.- Returns:
- the prefix
-
actualPrefixTipText
public String actualPrefixTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setPredictedColumn
public void setPredictedColumn(SpreadSheetColumnIndex value)
Sets the column of the predicted labels.- Parameters:
value- the index
-
getPredictedColumn
public SpreadSheetColumnIndex getPredictedColumn()
Returns the column of the predicted labels.- Returns:
- the index
-
predictedColumnTipText
public String predictedColumnTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setPredictedPrefix
public void setPredictedPrefix(String value)
Sets the prefix of the predicted labels.- Parameters:
value- the prefix
-
getPredictedPrefix
public String getPredictedPrefix()
Returns the prefix of the predicted labels.- Returns:
- the prefix
-
predictedPrefixTipText
public String predictedPrefixTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setProbabilityColumn
public void setProbabilityColumn(SpreadSheetColumnIndex value)
Sets the column with the probabilities (optional).- Parameters:
value- the index
-
getProbabilityColumn
public SpreadSheetColumnIndex getProbabilityColumn()
Returns the column with the probabilities (optional).- Returns:
- the index
-
probabilityColumnTipText
public String probabilityColumnTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setClassDistributionRange
public void setClassDistributionRange(SpreadSheetColumnRange value)
Sets the columns with the class distributions (optional).- Parameters:
value- the range
-
getClassDistributionRange
public SpreadSheetColumnRange getClassDistributionRange()
Returns the columns with the class distributions (optional).- Returns:
- the range
-
classDistributionRangeTipText
public String classDistributionRangeTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setStatistics
public void setStatistics(SummaryStatistic[] value)
Sets the statistics to calculate.- Parameters:
value- the statistics
-
getStatistics
public SummaryStatistic[] getStatistics()
Returns the statistics to calculate.- Returns:
- the statistics
-
statisticsTipText
public String statisticsTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
doExecute
protected String doExecute()
Executes the flow item.- Specified by:
doExecutein classAbstractActor- Returns:
- null if everything is fine, otherwise error message
-
-