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 Detail

      • m_ActualPrefix

        protected String m_ActualPrefix
        the optional prefix for the actual 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.
    • Constructor Detail

      • SummaryStatistics

        public SummaryStatistics()
    • Method Detail

      • 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:
        doExecute in class AbstractActor
        Returns:
        null if everything is fine, otherwise error message