Class ADerivateFilter

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected boolean withBoundaries
      Flag that states wheter the filter should add a padding to the derivate assure that is has the same length as the origin time series or not.
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      protected abstract double[] derivate​(double[] t)
      Calculates the derivate of a time series.
      protected abstract double[] derivateWithBoundaries​(double[] t)
      Calcuates the derivates of a time series.
      void fit​(double[] input)
      The function only fits a single instance of the dataset
      void fit​(double[][] input)  
      void fit​(TimeSeriesDataset input)
      the function computes the needed information for the transform function.
      double[] fitTransform​(double[] input)
      the function fit and transforms a single instance
      double[][] fitTransform​(double[][] input)  
      TimeSeriesDataset fitTransform​(TimeSeriesDataset input)
      a utility function to avoid the added effort of calling the fit and transform function separate
      double[] transform​(double[] input)
      This function transforms only a single instance.
      double[][] transform​(double[][] input)  
      TimeSeriesDataset transform​(TimeSeriesDataset input)
      represents a function working on a dataset by transforming the dataset itself.
      • Methods inherited from class java.lang.Object

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

      • withBoundaries

        protected boolean withBoundaries
        Flag that states wheter the filter should add a padding to the derivate assure that is has the same length as the origin time series or not.
    • Constructor Detail

      • ADerivateFilter

        public ADerivateFilter​(boolean withBoundaries)
      • ADerivateFilter

        public ADerivateFilter()
    • Method Detail

      • derivate

        protected abstract double[] derivate​(double[] t)
        Calculates the derivate of a time series.
        Parameters:
        t - The time series to calculate the derivate for.
        Returns:
        The derivate of the time series.
      • derivateWithBoundaries

        protected abstract double[] derivateWithBoundaries​(double[] t)
        Calcuates the derivates of a time series. In contrast to the normal derivate(double[]) calculation, this method is guaranteed to return a derivate that has the same length than the original time series. This is accomplished via padding.
        Parameters:
        t - The time series to calculate the derivate for.
        Returns:
        The, possibly padded, derivate of the time series.
      • transform

        public TimeSeriesDataset transform​(TimeSeriesDataset input)
        Description copied from interface: IFilter
        represents a function working on a dataset by transforming the dataset itself.
        Specified by:
        transform in interface IFilter
        Parameters:
        input - the data set that is to transform
        Returns:
        the transformt dataset
      • transform

        public double[] transform​(double[] input)
        Description copied from interface: IFilter
        This function transforms only a single instance.
        Specified by:
        transform in interface IFilter
        Parameters:
        input - the to transform instance
        Returns:
        the transformed instance
      • transform

        public double[][] transform​(double[][] input)
        Specified by:
        transform in interface IFilter
      • fit

        public void fit​(TimeSeriesDataset input)
        Description copied from interface: IFilter
        the function computes the needed information for the transform function.
        Specified by:
        fit in interface IFilter
        Parameters:
        input - the dataset that is to transform
      • fit

        public void fit​(double[] input)
        Description copied from interface: IFilter
        The function only fits a single instance of the dataset
        Specified by:
        fit in interface IFilter
        Parameters:
        input - The to fit instance
      • fit

        public void fit​(double[][] input)
        Specified by:
        fit in interface IFilter
      • fitTransform

        public TimeSeriesDataset fitTransform​(TimeSeriesDataset input)
        Description copied from interface: IFilter
        a utility function to avoid the added effort of calling the fit and transform function separate
        Specified by:
        fitTransform in interface IFilter
        Parameters:
        input - the dataset that is to be transfromed
        Returns:
        the transformed dataset
      • fitTransform

        public double[] fitTransform​(double[] input)
        Description copied from interface: IFilter
        the function fit and transforms a single instance
        Specified by:
        fitTransform in interface IFilter
        Parameters:
        input - the to fit and transform instance
        Returns:
        the transformed instance
      • fitTransform

        public double[][] fitTransform​(double[][] input)
        Specified by:
        fitTransform in interface IFilter