Class DriftMethodTimeSeries


  • public class DriftMethodTimeSeries
    extends TimeSeries<java.lang.Double>
    The drift method extrapolates a line through the first observation and the last observation for computing the next forecast.
    Author:
    Andreas Rogge-Solti
    • Constructor Detail

      • DriftMethodTimeSeries

        public DriftMethodTimeSeries()
    • Method Detail

      • fit

        protected void fit​(LimitedQueue<Observation<java.lang.Double>> currentObservations)
        Description copied from class: TimeSeries
        Subclasses need to fit their corresponding time series model to the currently available data.
        Specified by:
        fit in class TimeSeries<java.lang.Double>
      • getPrediction

        protected Prediction<java.lang.Double> getPrediction​(int h,
                                                             java.lang.Object... payload)
        Description copied from class: TimeSeries
        Subclasses need to provide an implementation for the prediction of h-steps into the future given the current position
        Specified by:
        getPrediction in class TimeSeries<java.lang.Double>
        Parameters:
        h - the prediction/forecast horizon
        payload - additional information which is available at time of prediction (if there are other additional explanatory variables)
      • isAvailable

        protected boolean isAvailable​(java.lang.Double observation)
        Specified by:
        isAvailable in class TimeSeries<java.lang.Double>