Class NaiveMethodTimeSeries


  • public class NaiveMethodTimeSeries
    extends TimeSeries<java.lang.Double>
    The naive predictor for a time series simply returns the latest value as the predictor for the next one.
    Author:
    andreas
    • Constructor Detail

      • NaiveMethodTimeSeries

        public NaiveMethodTimeSeries()
    • 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>