ARMACoefficients¶
- class ARMACoefficients(*args)¶
Coefficients of an ARMA process (MA or AR part).
- Available constructors:
ARMACoefficients(size, dimension)
ARMACoefficients(coeffList)
ARMACoefficients(matrixColl)
- Parameters:
- sizeint,
The number of elements in the list.
- dimensionint,
The dimension of each element in the list.
- coeffLista list of floats,
In dimension 1, the list of the coefficients defining the recurrence of the ARMA process (MA or AR part).
- matrixColla list of
SquareMatrix
In dimension , the collection of square matrices in defining the recurrence of the ARMA process (MA or AR part).
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.
find
(val)Find the index of a given value.
Accessor to the object's name.
Accessor to the dimension of coefficients in the list.
getName
()Accessor to the object's name.
getSize
()Get the collection's dimension (or size).
hasName
()Test if the object is named.
isEmpty
()Tell if the collection is empty.
resize
(newSize)Change the size of the collection.
select
(marginalIndices)Selection from indices.
setName
(name)Accessor to the object's name.
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])
- __init__(*args)¶
- add(*args)¶
Add a new element in the list.
- Available usages:
add(coeff)
add(squareMat)
- Parameters:
- coefffloat
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:
- indexpositive int
Position of the element to access.
- Returns:
- elementtype 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.Point(2) >>> x.clear() >>> x class=Point name=Unnamed dimension=0 values=[]
- find(val)¶
Find the index of a given value.
- Parameters:
- valcollection value type
The value to find
- Returns:
- indexint
The index of the first occurrence of the value, or the size of the container if not found. When several values match, only the first index is returned.
- getClassName()¶
Accessor to the object’s name.
- Returns:
- class_namestr
The object class name (object.__class__.__name__).
- getDimension()¶
Accessor to the dimension of coefficients in the list.
- Returns:
- dimensionint
The dimension of elements in the list.
- getName()¶
Accessor to the object’s name.
- Returns:
- namestr
The name of the object.
- getSize()¶
Get the collection’s dimension (or size).
- Returns:
- nint
The number of components in the collection.
- hasName()¶
Test if the object is named.
- Returns:
- hasNamebool
True if the name is not empty.
- isEmpty()¶
Tell if the collection is empty.
- Returns:
- isEmptybool
True if there is no element in the collection.
Examples
>>> import openturns as ot >>> x = ot.Point(2) >>> x.isEmpty() False >>> x.clear() >>> x.isEmpty() True
- resize(newSize)¶
Change the size of the collection.
- Parameters:
- newSizepositive 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.Point(2, 4) >>> print(x) [4,4] >>> x.resize(1) >>> print(x) [4] >>> x.resize(4) >>> print(x) [4,0,0,0]
- select(marginalIndices)¶
Selection from indices.
- Parameters:
- indicessequence of int
Indices to select
- Returns:
- collsequence
Sub-collection of values at the selection indices.
- setName(name)¶
Accessor to the object’s name.
- Parameters:
- namestr
The name of the object.
Examples using the class¶
Estimate a multivariate ARMA process
Estimate a scalar ARMA process
Create and manipulate an ARMA process