ARMACoefficients

class ARMACoefficients(*args)

Coefficients of an ARMA process (MA or AR part).

Available constructors:

ARMACoefficients(size, dimension)

ARMACoefficients(coeffList)

ARMACoefficients(matrixColl)

Parameters:

size : int,

The number of elements in the list.

dimension : int,

The dimension of each element in the list.

coeffList : a list of floats,

In dimension 1, the list of the coefficients defining the recurrence of the ARMA process (MA or AR part).

matrixColl : a list of SquareMatrix

In dimension d, the collection of square matrices in \Rset^d \times \Rset^d defining the recurrence of the ARMA process (MA or AR part).

Notes

  • In the first constructor:

The elements are the null elements (scalar in dimension 1 and the null matrix in upper dimension).

  • In the other constructor:

The elements are specified in the constructor.

Examples

Create the coefficients defining the recurrence of an ARMA process:

>>> import openturns as ot
>>> myARCoef = ot.ARMACoefficients([0.4, 0.3, 0.2, 0.1])
>>> myMACoef = ot.ARMACoefficients([0.4, 0.3])

Methods

add(*args) Add a new element in the list.
at(*args) Access to an element of the collection.
clear() Reset the collection to zero dimension.
getClassName() Accessor to the object’s name.
getDimension() Accessor to the dimension of coefficients in the list.
getId() Accessor to the object’s id.
getName() Accessor to the object’s name.
getShadowedId() Accessor to the object’s shadowed id.
getSize() Get the collection’s dimension (or size).
getVisibility() Accessor to the object’s visibility state.
hasName() Test if the object is named.
hasVisibleName() Test if the object has a distinguishable name.
isEmpty() Tell if the collection is empty.
resize(newSize) Change the size of the collection.
setName(name) Accessor to the object’s name.
setShadowedId(id) Accessor to the object’s shadowed id.
setVisibility(visible) Accessor to the object’s visibility state.
__init__(*args)
add(*args)

Add a new element in the list.

Available usages:

add(coeff)

add(squareMat)

Parameters:

coeff : float

A new scalar coefficient added to the list composed with scalars.

squareMat : SquareMatrix

A new element in the list composed with square matrices.

Returns:
  • In the first usage:

A new list of elements composed with scalars.

  • In the second usage:

A new list of elements composed with square matrices.

at(*args)

Access to an element of the collection.

Parameters:

index : positive int

Position of the element to access.

Returns:

element : type depends on the type of the collection

Element of the collection at the position index.

clear()

Reset the collection to zero dimension.

Examples

>>> import openturns as ot
>>> x = ot.NumericalPoint(2)
>>> x.clear()
>>> x
class=NumericalPoint name=Unnamed dimension=0 values=[]
getClassName()

Accessor to the object’s name.

Returns:

class_name : str

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

getDimension()

Accessor to the dimension of coefficients in the list.

Returns:

dimension : int

The dimension of elements in the list.

getId()

Accessor to the object’s id.

Returns:

id : int

Internal unique identifier.

getName()

Accessor to the object’s name.

Returns:

name : str

The name of the object.

getShadowedId()

Accessor to the object’s shadowed id.

Returns:

id : int

Internal unique identifier.

getSize()

Get the collection’s dimension (or size).

Returns:

n : int

The number of components in the collection.

getVisibility()

Accessor to the object’s visibility state.

Returns:

visible : bool

Visibility flag.

hasName()

Test if the object is named.

Returns:

hasName : bool

True if the name is not empty.

hasVisibleName()

Test if the object has a distinguishable name.

Returns:

hasVisibleName : bool

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

isEmpty()

Tell if the collection is empty.

Returns:

isEmpty : bool

True if there is no element in the collection.

Examples

>>> import openturns as ot
>>> x = ot.NumericalPoint(2)
>>> x.isEmpty()
False
>>> x.clear()
>>> x.isEmpty()
True
resize(newSize)

Change the size of the collection.

Parameters:

newSize : positive int

New size of the collection.

Notes

If the new size is smaller than the older one, the last elements are thrown away, else the new elements are set to the default value of the element type.

Examples

>>> import openturns as ot
>>> x = ot.NumericalPoint(2, 4)
>>> print(x)
[4,4]
>>> x.resize(1)
>>> print(x)
[4]
>>> x.resize(4)
>>> print(x)
[4,0,0,0]
setName(name)

Accessor to the object’s name.

Parameters:

name : str

The name of the object.

setShadowedId(id)

Accessor to the object’s shadowed id.

Parameters:

id : int

Internal unique identifier.

setVisibility(visible)

Accessor to the object’s visibility state.

Parameters:

visible : bool

Visibility flag.