Class TimeSeries<H>
- java.lang.Object
-
- org.processmining.plugins.stochasticpetrinet.simulator.timeseries.TimeSeries<H>
-
- Type Parameters:
H- the predicted variable which is supposedly correlated to its previous values.
- Direct Known Subclasses:
AverageMethodTimeSeries,DriftMethodTimeSeries,LastObservationTimeSeries,NaiveMethodTimeSeries,RTimeSeries,SeasonalNaiveMethodTimeSeries
public abstract class TimeSeries<H> extends java.lang.ObjectA time series of values (might be durations, might be rates, might be anything)- Author:
- Andreas Rogge-Solti
-
-
Constructor Summary
Constructors Constructor Description TimeSeries()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidaddObservation(Observation<H> observation)protected Observation<H>findLastAvailableObservation()protected abstract voidfit(LimitedQueue<Observation<H>> currentObservations)Subclasses need to fit their corresponding time series model to the currently available data.Observation<H>getLastObservation()Observation<H>getObservationOfLastSeason(long index)protected abstract Prediction<H>getPrediction(int h, java.lang.Object... payload)Subclasses need to provide an implementation for the prediction of h-steps into the future given the current positionprotected abstract booleanisAvailable(H observation)Prediction<H>predict(int h, java.lang.Object... payload)Performs a forecast based on the current observations h steps ahead.voidresetTo(java.util.List<Observation<H>> observations)resets the current observations to the passed observations (useful for initialization)voidsetKey(java.lang.String key)
-
-
-
Method Detail
-
resetTo
public void resetTo(java.util.List<Observation<H>> observations)
resets the current observations to the passed observations (useful for initialization)- Parameters:
observations- List ofObservations
-
predict
public Prediction<H> predict(int h, java.lang.Object... payload)
Performs a forecast based on the current observations h steps ahead.- Parameters:
h- the forecast horizon- Returns:
Predictiona prediction
-
addObservation
public void addObservation(Observation<H> observation)
-
getLastObservation
public Observation<H> getLastObservation()
-
findLastAvailableObservation
protected Observation<H> findLastAvailableObservation()
-
getObservationOfLastSeason
public Observation<H> getObservationOfLastSeason(long index)
-
isAvailable
protected abstract boolean isAvailable(H observation)
-
setKey
public void setKey(java.lang.String key)
-
fit
protected abstract void fit(LimitedQueue<Observation<H>> currentObservations)
Subclasses need to fit their corresponding time series model to the currently available data.
-
getPrediction
protected abstract Prediction<H> getPrediction(int h, java.lang.Object... payload)
Subclasses need to provide an implementation for the prediction of h-steps into the future given the current position- Parameters:
h- the prediction/forecast horizonpayload- additional information which is available at time of prediction (if there are other additional explanatory variables)
-
-