Class ColumnSubset

  • All Implemented Interfaces:
    Destroyable, ErrorProvider, GlobalInfoSupporter, LoggingLevelHandler, LoggingSupporter, OptionHandler, SizeOfHandler, Serializable

    public class ColumnSubset
    extends AbstractMetaRowScore
    Applies the specified base row score algorithm to the specified subset of columns and returns the calculated score.

    -logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel)
        The logging level for outputting errors and debugging output.
        default: WARNING
     
    -row-score <adams.data.spreadsheet.rowscore.AbstractRowScore> (property: rowScore)
        The row score algorithm to apply to the column subset.
        default: adams.data.spreadsheet.rowscore.ArrayStatistic -statistic adams.data.statistics.ArrayMean
     
    -columns <adams.data.spreadsheet.SpreadSheetColumnRange> (property: columns)
        The range of columns to apply the specified row score algorithm to.
        default: first-last
        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
     
    Version:
    $Revision$
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Constructor Detail

      • ColumnSubset

        public ColumnSubset()
    • Method Detail

      • rowScoreTipText

        public String rowScoreTipText()
        Returns the tip text for this property.
        Specified by:
        rowScoreTipText in class AbstractMetaRowScore
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setColumns

        public void setColumns​(SpreadSheetColumnRange value)
        Sets the range of columns to apply the row score algorithm to.
        Parameters:
        value - the range
      • getColumns

        public SpreadSheetColumnRange getColumns()
        Returns the range of columns to apply the row score algorithm to.
        Returns:
        the range
      • columnsTipText

        public String columnsTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • doCalculateScore

        protected Double[] doCalculateScore​(SpreadSheet sheet,
                                            int rowIndex)
        Performs the actual calculation of the row score.
        Specified by:
        doCalculateScore in class AbstractRowScore
        Parameters:
        sheet - the spreadsheet to generate the score for
        rowIndex - the row index
        Returns:
        the generated score, null in case of an error