WhittleFactoryState

class WhittleFactoryState(*args)

Last state recorded of a scalar ARMA process.

Parameters
pint

AR order of the estimated ARMA(p,q).

ARMACoeffsequence of float of dimension p+q

Coefficients of the AR then MA part of the estimated ARMA(p,q) process.

sigma2float

Variance of the white noise.

criteriasequence of float of dimension 3

The values of the criteria AIC, AIC_c (corrected AIC) and BIC on the estimated ARMA(p,q) process.

timeGridRegularGrid

Time grid of the ARMA(p,q) process.

Examples

Create a time series from a scalar ARMA(4,2) and a normal white noise:

>>> import openturns as ot
>>> myTimeGrid = ot.RegularGrid(0.0, 0.1, 20)
>>> myWhiteNoise = ot.WhiteNoise(ot.Triangular(-1.0, 0.0, 1.0), myTimeGrid)
>>> myARCoef = ot.ARMACoefficients([0.4, 0.3, 0.2, 0.1])
>>> myMACoef = ot.ARMACoefficients([0.4, 0.3])
>>> myARMAProcess = ot.ARMA(myARCoef, myMACoef, myWhiteNoise)
>>> myTimeSeries = myARMAProcess.getRealization()
>>> myProcessSample = myARMAProcess.getSample(20)

Estimate the ARMA process specifying a range for the orders:

>>> pIndices = [1, 2]
>>> qIndices =  [4, 5]
>>> myFactory_Range = ot.WhittleFactory(pIndices, qIndices)

Print all the models and their state:

>>> myWhittleHistory = myFactory_Range.getHistory()
>>> for i in range(myWhittleHistory.getSize()):
...     model_i = myWhittleHistory[i]
...     arma = model_i.getARMA()
...     print('Order(p,q) = '+str(model_i.getP())+', '+str(model_i.getQ()))
...     print('AR coeff = '+str(model_i.getARCoefficients()))
...     print('MA coeff = '+str(model_i.getMACoefficients()))
...     print('White Noise - Sigma = '+str(model_i.getSigma2()))
...     print('Criteria AICc, AIC, BIC = '+str(model_i.getInformationCriteria()))

Methods

getARCoefficients(self)

Accessor to the AR coefficients of the scalar ARMA process.

getARMA(self)

Accessor to the estimated scalar ARMA.

getClassName(self)

Accessor to the object’s name.

getId(self)

Accessor to the object’s id.

getInformationCriteria(self)

Accessor to the values of the criteria AIC, AIC_c and BIC.

getMACoefficients(self)

Accessor to the MA coefficients of the scalar ARMA process.

getName(self)

Accessor to the object’s name.

getP(self)

Accessor to AR order.

getQ(self)

Accessor to MA order.

getShadowedId(self)

Accessor to the object’s shadowed id.

getSigma2(self)

Accessor to the variance of the white noise.

getTheta(self)

Accessor to the coefficients of the scalar ARMA process.

getTimeGrid(self)

Accessor to the time grid of the scalar ARMA process.

getVisibility(self)

Accessor to the object’s visibility state.

getWhiteNoise(self)

Accessor to the white noise defining the scalar ARMA process.

hasName(self)

Test if the object is named.

hasVisibleName(self)

Test if the object has a distinguishable name.

setName(self, name)

Accessor to the object’s name.

setShadowedId(self, id)

Accessor to the object’s shadowed id.

setVisibility(self, visible)

Accessor to the object’s visibility state.

__init__(self, \*args)

Initialize self. See help(type(self)) for accurate signature.

getARCoefficients(self)

Accessor to the AR coefficients of the scalar ARMA process.

Returns
ARCoeffARMACoefficients

The AR coefficients of the linear recurrence defining the process.

getARMA(self)

Accessor to the estimated scalar ARMA.

Returns
MACoeffARMA

The estimated ARMA model.

getClassName(self)

Accessor to the object’s name.

Returns
class_namestr

The object class name (object.__class__.__name__).

getId(self)

Accessor to the object’s id.

Returns
idint

Internal unique identifier.

getInformationCriteria(self)

Accessor to the values of the criteria AIC, AIC_c and BIC.

Returns
criteriaPoint of dimension 3

Values of the criteria AIC, AIC_c (corrected AIC) and BIC of the estimated model.

getMACoefficients(self)

Accessor to the MA coefficients of the scalar ARMA process.

Returns
MACoeffARMACoefficients

The MA coefficients of the linear recurrence defining the process.

getName(self)

Accessor to the object’s name.

Returns
namestr

The name of the object.

getP(self)

Accessor to AR order.

Returns
pint

Order of the AR part of the estimated model.

getQ(self)

Accessor to MA order.

Returns
qint

Order of the MA part of the estimated model.

getShadowedId(self)

Accessor to the object’s shadowed id.

Returns
idint

Internal unique identifier.

getSigma2(self)

Accessor to the variance of the white noise.

Parameters
sigma2positive float

Variance of the white noise.

getTheta(self)

Accessor to the coefficients of the scalar ARMA process.

Returns
coeffPoint

The AR and MA coefficients of the linear recurrence defining the process.

getTimeGrid(self)

Accessor to the time grid of the scalar ARMA process.

Returns
timeGridRegularGrid

Time grid over which the ARMA process is defined.

getVisibility(self)

Accessor to the object’s visibility state.

Returns
visiblebool

Visibility flag.

getWhiteNoise(self)

Accessor to the white noise defining the scalar ARMA process.

Returns
whiteNoiseWhiteNoise

The white noise of the estimated model.

hasName(self)

Test if the object is named.

Returns
hasNamebool

True if the name is not empty.

hasVisibleName(self)

Test if the object has a distinguishable name.

Returns
hasVisibleNamebool

True if the name is not empty and not the default one.

setName(self, name)

Accessor to the object’s name.

Parameters
namestr

The name of the object.

setShadowedId(self, id)

Accessor to the object’s shadowed id.

Parameters
idint

Internal unique identifier.

setVisibility(self, visible)

Accessor to the object’s visibility state.

Parameters
visiblebool

Visibility flag.