public class LagPolynomial extends Object
| Modifier and Type | Method and Description |
|---|---|
double |
apply(TimeSeries timeSeries,
int index)
Apply this lag polynomial to a time series at the given index.
|
double |
apply(TimeSeries timeSeries,
OffsetDateTime dateTime)
Apply this lag polynomial to a time series at the given date-time.
|
static LagPolynomial |
autoRegressive(double... parameters)
Create and return a new autoregressive lag polynomial.
|
static LagPolynomial |
differences(int d)
Create and return a new lag polynomial representing an arbitrary number of differences.
|
boolean |
equals(Object obj) |
static LagPolynomial |
firstDifference()
Create and return a new lag polynomial representing the first difference operator.
|
int |
hashCode() |
double[] |
inverseParams()
Return the additive inverse of the parameters of this lag polynomial.
|
static LagPolynomial |
movingAverage(double... parameters)
Create and return a new moving average lag polynomial.
|
double[] |
parameters()
Return the parameters of this lag polynomial.
|
static LagPolynomial |
seasonalDifferences(int seasonalLag,
int D)
Create and return a new lag polynomial representing an arbitrary number of seasonal differences.
|
double |
solve(double[] timeSeries,
int index)
Apply this lag polynomial to the series at the given index,
then solve for the value of the series at that index.
|
double |
solve(TimeSeries timeSeries,
int index)
Apply this lag polynomial to the series at the given index,
then solve for the value of the series at that index.
|
double |
solve(TimeSeries timeSeries,
OffsetDateTime dateTime)
Apply this lag polynomial to the series at the given date-time,
then solve for the value of the series at that date-time.
|
LagPolynomial |
times(LagPolynomial other)
Multiply this polynomial by another lag polynomial and return the result in a new lag polynomial.
|
String |
toString() |
public static LagPolynomial firstDifference()
public static LagPolynomial seasonalDifferences(int seasonalLag, int D)
seasonalLag - the period of seasonality; the lag to use for the operator.D - the number of seasonal differences.public static LagPolynomial differences(int d)
d - the number of differences. An integer greater than or equal to 0.public static LagPolynomial movingAverage(double... parameters)
parameters - the moving average parameters of an ARIMA model.public static LagPolynomial autoRegressive(double... parameters)
parameters - the autoregressive parameters of an ARIMA model.public final LagPolynomial times(LagPolynomial other)
other - the polynomial to multiply this one with.public final double apply(TimeSeries timeSeries, int index)
timeSeries - the time series containing the index to apply this lag polynomial to.index - the index of the series to apply the lag polynomial at.public final double apply(TimeSeries timeSeries, OffsetDateTime dateTime)
timeSeries - the time series containing the index to apply this lag polynomial to.dateTime - the date-time of the series to apply the lag polynomial at.public double solve(TimeSeries timeSeries, int index)
timeSeries - the time series containing the index to apply the lag polynomial to.index - the index of the series to apply the lag polynomial at.public double solve(TimeSeries timeSeries, OffsetDateTime dateTime)
timeSeries - the time series containing the date-time to apply the lag polynomial to.dateTime - the date-time of the series to apply the lag polynomial at.public double solve(double[] timeSeries,
int index)
timeSeries - the time series containing the index to apply the lag polynomial to.index - the index of the series to apply the lag polynomial at.public final double[] parameters()
public final double[] inverseParams()