SecondOrderModel

class SecondOrderModel(*args)

Second order model.

Notes

We consider X: \Omega \times\cD \mapsto \Rset^d a multivariate stochastic process of dimension d, where \omega \in \Omega is an event, \cD is a domain of \Rset^n, \vect{t}\in \cD is a multivariate index and X(\omega, \vect{t}) \in \Rset^d.

We note X_{\vect{t}}: \Omega \rightarrow \Rset^d the random variable at index \vect{t} \in \cD defined by X_{\vect{t}}(\omega)=X(\omega, \vect{t}) and X(\omega): \cD  \mapsto \Rset^d a realization of the process X, for a given \omega \in \Omega defined by X(\omega)(\vect{t})=X(\omega, \vect{t}).

The SecondOrderModel class enable to get both spectral information of such process thanks to the SpectralModel class and spatial/temporal information using the CovarianceModel information.

A SecondOrderModel object can be created only through its derived classes: ExponentialCauchy

Methods

computeCovariance(*args) Evaluate the covariance function.
computeSpectralDensity(frequency) Evaluate the spectral density function for a specific frequency.
discretize(timeGrid) Discretize the second order on a given RegularGrid/Mesh model using its covariance function.
getClassName() Accessor to the object’s name.
getCovarianceModel() Return the covariance model.
getDimension() Get the dimension of the SecondOrderModel.
getId() Accessor to the object’s id.
getImplementation(*args) Accessor to the underlying implementation.
getName() Accessor to the object’s name.
getSpatialDimension() Get the spatial dimension of the spectral density function.
getSpectralModel() Return the spectral model.
setModels(covarianceModel, spectralModel) Set both the covariance and spectral models of a second order model.
setName(name) Accessor to the object’s name.
__init__(*args)

x.__init__(…) initializes x; see help(type(x)) for signature

computeCovariance(*args)

Evaluate the covariance function.

Available usages:

computeCovariance(s, t)

computeCovariance(tau)

Parameters:

s, t : floats or sequence of floats.

Inputs.

tau : float or sequence of floats.

Input.

Returns:

covariance : CovarianceMatrix

The evaluation of the covariance function.

Notes

computeCovariance evaluates the covariance model C : \cD \times \cD \mapsto  \cM_{d \times d}(\Rset) at (s,t)\in \Rset^n:

C(\vect{s}, \vect{t})=\Expect{(X_{\vect{s}}-m(\vect{s}))\Tr{(X_{\vect{t}}-m(\vect{t}))}}

We note that the first usage calls the second as model is stationary. Thus,
C(\vect{s}, \vect{t}) = C^{stat}(\vect{\tau}) with \vect{\tau}=\vect{s}-\vect{t}.
computeSpectralDensity(frequency)

Evaluate the spectral density function for a specific frequency.

Parameters:

f : float

Frequency value.

Returns:

spd : HermitianMatrixs

The evaluation of spectral density function at frequency f.

Notes

computeSpectralDensity evaluates the spectral model S : \Rset^n \mapsto  \cH^+_{d} at f\in \Rset^n:

\forall \vect{f} \in \Rset^n, \cS(\vect{f}) = \prod_{k=1}^{n} \vect{\theta}_k \mat{\Sigma} \rho(\vect{f} \odot \vect{\theta})

where \mat{\Sigma} is a covariance matrix that explains the covariance structure and (\vect{f} \odot \vect{\theta})_k = \vect{f}_k \vect{\theta}_k

discretize(timeGrid)

Discretize the second order on a given RegularGrid/Mesh model using its covariance function.

Parameters:

meshOrGrid : Mesh or RegularGrid

Mesh or time grid of size N associated with the process.

Returns:

covarianceMatrix : CovarianceMatrix

Covariance matrix \in\cM_{nd\times nd}(\Rset) (if the process is of dimension d).

Notes

This method makes a discretization of the covariance model on meshOrGrid composed of the vertices (\vect{t}_1, \dots, \vect{t}_{N-1}) and returns the covariance matrix:

\mat{C}_{1,\dots,k} = \left(
    \begin{array}{cccc}
    C(\vect{t}_1, \vect{t}_1) &C(\vect{t}_1, \vect{t}_2) & \dots & C(\vect{t}_1, \vect{t}_{k}) \\
    \dots & C(\vect{t}_2, \vect{t}_2)  & \dots & C(\vect{t}_2, \vect{t}_{k}) \\
    \dots & \dots & \dots & \dots \\
    \dots & \dots & \dots & C(\vect{t}_{k}, \vect{t}_{k})
    \end{array} \right)

getClassName()

Accessor to the object’s name.

Returns:

class_name : str

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

getCovarianceModel()

Return the covariance model.

Returns:

covarianceModel : CovarianceModel

The covariance model of the second order model.

getDimension()

Get the dimension of the SecondOrderModel.

Returns:

dimension : int

Dimension of the SecondOrderModel.

getId()

Accessor to the object’s id.

Returns:

id : int

Internal unique identifier.

getImplementation(*args)

Accessor to the underlying implementation.

Returns:

impl : Implementation

The implementation class.

getName()

Accessor to the object’s name.

Returns:

name : str

The name of the object.

getSpatialDimension()

Get the spatial dimension of the spectral density function.

Returns:

spatialDimension : int

SpatialDimension of the SecondOrderModel.

getSpectralModel()

Return the spectral model.

Returns:

spectralModel : SpectralModel

The spectral model of the second order model.

setModels(covarianceModel, spectralModel)

Set both the covariance and spectral models of a second order model.

Parameters:

covarianceModel : CovarianceModel

The covariance model of the second order model.

spectralModel : SpectralModel

The spectral model of the second order model.

setName(name)

Accessor to the object’s name.

Parameters:

name : str

The name of the object.