Class TimeSeriesTranslate

  • All Implemented Interfaces:
    java.io.Serializable, CapabilitiesHandler, OptionHandler, RevisionHandler, UnsupervisedFilter
    Direct Known Subclasses:
    TimeSeriesDelta

    public class TimeSeriesTranslate
    extends AbstractTimeSeries
    An instance filter that assumes instances form time-series data and replaces attribute values in the current instance with the equivalent attribute values of some previous (or future) instance. For instances where the desired value is unknown either the instance may be dropped, or missing values used. Skips the class attribute if it is set.

    Valid options are:

     -R <index1,index2-index4,...>
      Specify list of columns to translate in time. First and
      last are valid indexes. (default none)
     -V
      Invert matching sense (i.e. calculate for all non-specified columns)
     -I <num>
      The number of instances forward to translate values
      between. A negative number indicates taking values from
      a past instance. (default -1)
     -M
      For instances at the beginning or end of the dataset where
      the translated values are not known, remove those instances
      (default is to use missing values).
    Version:
    $Revision: 5547 $
    Author:
    Len Trigg (trigg@cs.waikato.ac.nz)
    See Also:
    Serialized Form
    • Constructor Detail

      • TimeSeriesTranslate

        public TimeSeriesTranslate()
    • Method Detail

      • globalInfo

        public java.lang.String globalInfo()
        Returns a string describing this classifier
        Returns:
        a description of the classifier suitable for displaying in the explorer/experimenter gui
      • setInputFormat

        public boolean setInputFormat​(Instances instanceInfo)
                               throws java.lang.Exception
        Sets the format of the input instances.
        Overrides:
        setInputFormat in class AbstractTimeSeries
        Parameters:
        instanceInfo - an Instances object containing the input instance structure (any instances contained in the object are ignored - only the structure is required).
        Returns:
        true if the outputFormat may be collected immediately
        Throws:
        UnsupportedAttributeTypeException - if selected attributes are not numeric or nominal.
        java.lang.Exception - if the format couldn't be set successfully
      • main

        public static void main​(java.lang.String[] argv)
        Main method for testing this class.
        Parameters:
        argv - should contain arguments to the filter: use -h for help