Class StatefulTimeseriesDistribution

  • All Implemented Interfaces:
    java.io.Serializable, org.apache.commons.math3.analysis.UnivariateFunction, org.apache.commons.math3.distribution.RealDistribution
    Direct Known Subclasses:
    ARMATimeSeries, SinusoidalSeries

    public abstract class StatefulTimeseriesDistribution
    extends AnotherAbstractRealDistribution
    This is a "stateful" distribution that knows it's current time. Depending on its time, it has a value which is determined by the subclass (e.g. SinusoidalSeries)

    BEWARE: the class creating samples needs to update the current state to the sampling timestamp!

    Author:
    Andreas Rogge-Solti
    See Also:
    Serialized Form
    • Field Detail

      • noiseDistribution

        protected org.apache.commons.math3.distribution.RealDistribution noiseDistribution
      • onlyPositive

        protected boolean onlyPositive
    • Constructor Detail

      • StatefulTimeseriesDistribution

        public StatefulTimeseriesDistribution​(double noiseStandardDeviation)
      • StatefulTimeseriesDistribution

        public StatefulTimeseriesDistribution​(org.apache.commons.math3.distribution.RealDistribution noiseDist)
    • Method Detail

      • density

        public double density​(double x)
      • getCurrentSeriesValue

        protected abstract double getCurrentSeriesValue​(long currentTime)
        Sub-classes need to implement this. It returns the value of the time series model given the current time
        Parameters:
        currentTime - the current time as a POSIX timestamp (millis since 01-01-1970)
        Returns:
        double the value of the underlying series at the given point in time.
      • getSupportLowerBound

        public double getSupportLowerBound()
      • getSupportUpperBound

        public double getSupportUpperBound()
      • isSupportLowerBoundInclusive

        public boolean isSupportLowerBoundInclusive()
      • isSupportUpperBoundInclusive

        public boolean isSupportUpperBoundInclusive()
      • isSupportConnected

        public boolean isSupportConnected()
      • setCurrentTime

        public void setCurrentTime​(long currentTime)
      • sample

        public double sample()
        Specified by:
        sample in interface org.apache.commons.math3.distribution.RealDistribution
        Overrides:
        sample in class org.apache.commons.math3.distribution.AbstractRealDistribution
      • sample

        public double sample​(long time)