Class TimeSeriesFeature


  • public class TimeSeriesFeature
    extends java.lang.Object
    Class calculating features (e. g. mean, stddev or slope) on given subsequences of time series. Used e. g. for TimeSeriesTreeClassifier classifier.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  TimeSeriesFeature.FeatureType
      Feature types used within the time series tree.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int NUM_FEATURE_TYPES
      Number of features used within the time series tree.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static double calculateFeature​(TimeSeriesFeature.FeatureType fType, double[] vector, int t1, int t2, boolean useBiasCorrection)
      Function calculating the feature specified by the feature type fType for a given instance vector of the interval [t1, t2].
      static double[] getFeatures​(double[] vector, int t1, int t2, boolean useBiasCorrection)
      Function calculating all features occurring in TimeSeriesFeature.FeatureType at once using an online calculation approach for mean, standard deviation and the slope.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • NUM_FEATURE_TYPES

        public static final int NUM_FEATURE_TYPES
        Number of features used within the time series tree.
    • Constructor Detail

      • TimeSeriesFeature

        public TimeSeriesFeature()
    • Method Detail

      • getFeatures

        public static double[] getFeatures​(double[] vector,
                                           int t1,
                                           int t2,
                                           boolean useBiasCorrection)
        Function calculating all features occurring in TimeSeriesFeature.FeatureType at once using an online calculation approach for mean, standard deviation and the slope.
        Parameters:
        vector - The instance's vector which is used to calculate the features
        t1 - Start of the interval
        t2 - End of the interval (inclusive)
        useBiasCorrection - Indicator whether the bias (Bessel's) correction should be used for the standard deviation calculation
        Returns:
        Returns an double array of the size TimeSeriesTreeLearningAlgorithm#NUM_FEATURE_TYPES storing the generated feature values.
      • calculateFeature

        public static double calculateFeature​(TimeSeriesFeature.FeatureType fType,
                                              double[] vector,
                                              int t1,
                                              int t2,
                                              boolean useBiasCorrection)
        Function calculating the feature specified by the feature type fType for a given instance vector of the interval [t1, t2].
        Parameters:
        fType - The feature type to be calculated
        instance - The instance's vector which values are used
        t1 - Start of the interval
        t2 - End of the interval (inclusive)
        useBiasCorrection - Indicator whether the bias (Bessel's) correction should be used for the standard deviation calculation
        Returns:
        Returns the calculated feature for the specific instance and interval