Class FixedNumFeatures

  • All Implemented Interfaces:
    CleanUpHandler, Destroyable, GlobalInfoSupporter, LoggingLevelHandler, LoggingSupporter, OptionHandler, QuickInfoSupporter, ShallowCopySupporter<AbstractTimeseriesFeatureGenerator>, SizeOfHandler, Serializable, Comparable

    public class FixedNumFeatures
    extends AbstractMetaTimeseriesFeatureGenerator
    Meta-feature-generator that ensures that the generated output has a fixed number of data points.
    In case of filler type FIRST, the data gets inserted at the start, as opposed to at the end when using LAST.
    NUMERIC/STRING/BOOLEAN use the appropriate filler value that the user specified.
    The MISSING_* types just add a missing value of the appropriate data type.

    -logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel)
        The logging level for outputting errors and debugging output.
        default: WARNING
     
    -converter <adams.data.featureconverter.AbstractFeatureConverter> (property: converter)
        The base feature converter to use and trim to size or extend.
        default: adams.data.featureconverter.SpreadSheetFeatureConverter -data-row-type adams.data.spreadsheet.DenseDataRow -spreadsheet-type adams.data.spreadsheet.SpreadSheet
     
    -field <adams.data.report.Field> [-field ...] (property: fields)
        The fields to add to the output.
        default: 
     
    -notes <adams.core.base.BaseString> [-notes ...] (property: notes)
        The notes to add as attributes to the generated data, eg 'PROCESS INFORMATION'
        .
        default: 
     
    -generator <adams.data.timeseries.AbstractTimeseriesFeatureGenerator> (property: generator)
        The base generator to use.
        default: adams.data.timeseries.Values -converter \"adams.data.featureconverter.SpreadSheetFeatureConverter -data-row-type adams.data.spreadsheet.DenseDataRow -spreadsheet-type adams.data.spreadsheet.SpreadSheet\"
     
    -num-features <int> (property: numFeatures)
        The number of features to ensure, either trim or fill to satisfy.
        default: 1
        minimum: 1
     
    -header-template <java.lang.String> (property: headerTemplate)
        The template for filling in the header; '#' is 1-based index for filled 
        in value, '$' is 1-based, absolute column index; Using a header definition 
        of 'Att-1,Att-2,Att-3' with a size of 5 will give you: 'Filler-#' -> 'Att
        -1,Att-2,Att-3,Filler-1,Fillter-2', 'Filler-$' -> 'Att-1,Att-2,Att-3,Filler
        -4,Filler-5'
        default: Filler-#
     
    -filler-type <MISSING_NUMERIC|MISSING_STRING|MISSING_BOOLEAN|NUMERIC|STRING|BOOLEAN|FIRST|LAST> (property: fillerType)
        The type of filler to use.
        default: MISSING_NUMERIC
     
    -filler-numeric <double> (property: fillerNumeric)
        The value for a numeric filler.
        default: 0.0
     
    -filler-string <java.lang.String> (property: fillerString)
        The value for a string filler.
        default: 
     
    -filler-boolean <boolean> (property: fillerBoolean)
        The value for a boolean filler.
        default: false
     
    Version:
    $Revision$
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Detail

      • m_NumFeatures

        protected int m_NumFeatures
        the number of features to guarantee.
      • m_HeaderTemplate

        protected String m_HeaderTemplate
        the template to use in the header for missing values.
      • m_FillerNumeric

        protected double m_FillerNumeric
        the numeric filler.
      • m_FillerString

        protected String m_FillerString
        the string filler.
      • m_FillerBoolean

        protected boolean m_FillerBoolean
        the boolean filler.
    • Constructor Detail

      • FixedNumFeatures

        public FixedNumFeatures()
    • Method Detail

      • setNumFeatures

        public void setNumFeatures​(int value)
        Sets the number of features to guarantee.
        Parameters:
        value - the number of features
      • getNumFeatures

        public int getNumFeatures()
        Returns the number of features to guarantee.
        Returns:
        the number of features
      • numFeaturesTipText

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

        public void setHeaderTemplate​(String value)
        Sets the template to use for filling in the header.
        Parameters:
        value - the template
      • getHeaderTemplate

        public String getHeaderTemplate()
        Returns the template to use for filling in the header.
        Returns:
        the template
      • headerTemplateTipText

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

        public void setFillerType​(FixedNumFeatures.FillerType value)
        Sets the type of filler to use.
        Parameters:
        value - the type
      • fillerTypeTipText

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

        public void setFillerNumeric​(double value)
        Sets the value to use for a numeric filler.
        Parameters:
        value - the value
      • getFillerNumeric

        public double getFillerNumeric()
        Returns the value to use for a numeric filler.
        Returns:
        the value
      • fillerNumericTipText

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

        public void setFillerString​(String value)
        Sets the value to use for a string filler.
        Parameters:
        value - the value
      • getFillerString

        public String getFillerString()
        Returns the value to use for a string filler.
        Returns:
        the value
      • fillerStringTipText

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

        public void setFillerBoolean​(boolean value)
        Sets the value to use for a boolean filler.
        Parameters:
        value - the value
      • getFillerBoolean

        public boolean getFillerBoolean()
        Returns the value to use for a boolean filler.
        Returns:
        the value
      • fillerBooleanTipText

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