DivFreeModel

(Source code, svg)

../../_images/openturns-experimental-DivFreeModel-1.svg
class DivFreeModel(*args)

Divergence-free covariance model.

Warning

This class is experimental and likely to be modified in future releases. To use it, import the openturns.experimental submodule.

This class builds a matrix-valued divergence-free covariance model from a scalar covariance model C, as described in [scheuerer2012].

Let C: \Rset^{\domainDim} \times \Rset^{\domainDim} \rightarrow \Rset be a scalar covariance model, and let \mat{H}(\vect{s}, \vect{t}) be the matrix of mixed second derivatives:

H_{ij}(\vect{s}, \vect{t}) = \frac{\partial^2 C(\vect{s}, \vect{t})}{\partial s_i \partial t_j}

The divergence-free covariance model is defined as:

\mat{C}_{\mathrm{div}}(\vect{s}, \vect{t})
    = \mathrm{tr}(\mat{H}(\vect{s}, \vect{t})) \, \mat{I}_{\processDim}
    - \mat{H}(\vect{s}, \vect{t})

The resulting model has input dimension \domainDim and output dimension \processDim, with \processDim = \domainDim. If the underlying scalar model has \mathcal{C}^{1,1} regularity, the associated random vector field has divergence-free sample paths almost surely.

The model is defined for input dimensions \domainDim \ge 2. For \domainDim > 3 the model has been conjectured to work but only proven for \domainDim = 2, 3 [scheuerer2012].

Parameters:
modelCovarianceModel

A scalar covariance model C: \Rset^{\domainDim} \times \Rset^{\domainDim} \rightarrow \Rset.

Methods

activateAmplitude(isAmplitudeActive)

Activate/deactivate the amplitude parameters.

activateNuggetFactor(isNuggetFactorActive)

Activate/deactivate the nugget factor.

activateScale(isScaleActive)

Activate/deactivate the scale parameters.

computeAsScalar(*args)

Compute the covariance function for a scalar model.

computeCrossCovariance(*args)

Compute the covariance function on two given meshes.

discretize(*args)

Discretize the covariance function on a given mesh.

discretizeAndFactorize(*args)

Discretize and factorize the covariance function on a given mesh.

discretizeAndFactorizeHMatrix(*args)

Discretize and factorize the covariance function on a given mesh using HMatrix.

discretizeAndFactorizeHODLRMatrix(*args)

Discretize and factorize the covariance function on a given mesh using HODLRMatrix.

discretizeHMatrix(*args)

Discretize the covariance function on a given mesh using HMatrix.

discretizeHODLRMatrix(*args)

Discretize the covariance function on a given mesh using HODLRMatrix.

discretizeRow(vertices, p)

Discretize the covariance function on a given mesh for a specific row.

draw(*args)

Draw a specific component of the covariance model with input dimension 1.

fourthOrderPartial(s, t)

Compute the fourth-order spatial derivatives of the (0, 0) output component of the covariance function.

getActiveParameter()

Accessor to the active parameter set.

getAmplitude()

Get the amplitude parameter \vect{\sigma} of the covariance function.

getClassName()

Accessor to the object's name.

getCovarianceModel()

Accessor to the underlying scalar covariance model.

getFullParameter()

Get the full parameters of the covariance function.

getFullParameterDescription()

Get the description of the full parameters of the covariance function.

getInputDimension()

Get the input dimension of the covariance function.

getMarginal(*args)

Get the marginal covariance model.

getName()

Accessor to the object's name.

getNuggetFactor()

Accessor to the nugget factor.

getOutputCorrelation()

Get the spatial correlation matrix \mat{R} of the covariance function.

getOutputDimension()

Get the output dimension of the covariance function.

getParameter()

Get the values of the active parameters of the covariance function.

getParameterDescription()

Get the description of the active parameters of the covariance function.

getScale()

Get the scale parameter \vect{\theta} of the covariance function.

hasName()

Test if the object is named.

isDiagonal()

Test whether the model is diagonal.

isParallel()

Accessor to the parallel flag.

isStationary()

Test whether the model is stationary.

parameterGradient(s, t)

Compute the gradient of the covariance function with respect to the active parameters.

parameterHessian(s, t)

Compute the mixed parameter-spatial Hessian of the (0, 0) output component of the covariance function.

partialGradient(s, t)

Compute the gradient of the covariance function with respect to the first index \vect{s}.

partialHessian(s, t)

Compute the Hessian of the (0, 0) output component of the covariance function with respect to the first index \vect{s}.

setActiveParameter(active)

Accessor to the active parameter set.

setAmplitude(amplitude)

Set the amplitude parameter \vect{\sigma} of the covariance function.

setFullParameter(parameter)

Set the full parameters of the covariance function.

setName(name)

Accessor to the object's name.

setNuggetFactor(nuggetFactor)

Set the nugget factor for the variance of the observation error.

setOutputCorrelation(correlation)

Set the spatial correlation matrix \mat{R} of the covariance function.

setParameter(parameter)

Set the values of the active parameters of the covariance function.

setScale(scale)

Set the scale parameter \vect{\theta} of the covariance function.

thirdOrderPartial(s, t)

Compute the third-order spatial derivatives of the (0, 0) output component of the covariance function.

Examples

>>> import openturns as ot
>>> import openturns.experimental as otexp
>>> scale = [1.0, 1.5]
>>> amplitude = [1.0]
>>> cov = ot.SquaredExponential(scale, amplitude)
>>> divFreeCov = otexp.DivFreeModel(cov)
>>> print(divFreeCov.getInputDimension())
2
>>> print(divFreeCov.getOutputDimension())
2
>>> s = [0.5, 0.3]
>>> t = [0.1, 0.2]
>>> print(divFreeCov(s, t))
[[ 0.407544  0.0163745 ]
 [ 0.0163745 0.773696  ]]
__init__(*args)
activateAmplitude(isAmplitudeActive)

Activate/deactivate the amplitude parameters.

In the context of kriging, defines whether the amplitude parameters should be tuned.

Parameters:
isAmplitudeActivebool

If True, all the amplitude parameters are tuned. If False, none of them is tuned.

activateNuggetFactor(isNuggetFactorActive)

Activate/deactivate the nugget factor.

In the context of kriging, defines whether the nugget factor should be tuned.

Parameters:
isNuggetFactorActivebool

If True (respectively False), the nugget factor is (respectively is not) tuned.

activateScale(isScaleActive)

Activate/deactivate the scale parameters.

In the context of kriging, defines whether the scale parameters should be tuned.

Parameters:
isScaleActivebool

If True, all the scale parameters are tuned. If False, none of them is tuned.

computeAsScalar(*args)

Compute the covariance function for a scalar model.

Available usages:

computeAsScalar(s, t)

computeAsScalar(tau)

Parameters:
s, tfloat or sequence of float

Multivariate index (\vect{s}, \vect{t}) \in \cD \times \cD. Scalars are accepted only if \domainDim = 1.

taufloat or sequence of float

Multivariate index \vect{\tau} \in \cD. A scalar is accepted only if \domainDim = 1.

Returns:
covariancefloat

Covariance value.

Notes

The method makes sense only if the dimension of the process is \processDim = 1, in which case the covariance matrix \mat{C}(\vect{s}, \vect{t}) reduces to the scalar covariance C(\vect{s}, \vect{t}) = \mat{C}_{11}(\vect{s}, \vect{t}). In the second usage, the covariance model must be stationary. We then note C^{stat}(\vect{\tau}) for C(\vect{s}, \vect{s} + \vect{\tau}), as this quantity does not depend on \vect{s}.

computeCrossCovariance(*args)

Compute the covariance function on two given meshes.

Parameters:
firstVerticesSample or Point

Container of the first discretization vertices.

secondVerticesSample or Point

Container of the second discretization vertices.

Returns:
crossCovarianceMatrix

Cross-covariance matrix of size N_1\processDim \times N_2\processDim, where N_1 and N_2 are the numbers of vertices in firstVertices and secondVertices.

Notes

The cross-covariance matrix is the evaluation of the covariance model on both firstVertices and secondVertices.

The result is a N_1\processDim \times N_2\processDim matrix, i.e. a block matrix whose (i, j) block is \mat{C}(\vect{x}_i, \vect{y}_j), where \vect{x}_0, \dots, \vect{x}_{N_1-1} are the points of firstVertices and \vect{y}_0, \dots, \vect{y}_{N_2-1} are the points of secondVertices. When \processDim = 1, this is the N_1 \times N_2 matrix with entries \mat{C}(\vect{x}_i, \vect{y}_j).

discretize(*args)

Discretize the covariance function on a given mesh.

Parameters:
whereMesh or RegularGrid or Sample

Container of the discretization vertices.

Returns:
covarianceMatrixCovarianceMatrix

Covariance matrix \mat{C}_{1, \dots, N} \in \cS_{N\processDim}^+(\Rset) of size N\processDim \times N\processDim, where N is the number of vertices.

Notes

Let \vect{t}_1, \dots, \vect{t}_N be the vertices of the given mesh. The method returns the block covariance matrix

\mat{C}_{1, \dots, N} =
\begin{pmatrix}
\mat{C}(\vect{t}_1, \vect{t}_1) & \dots &
\mat{C}(\vect{t}_1, \vect{t}_N) \\
\vdots & \ddots & \vdots \\
\mat{C}(\vect{t}_N, \vect{t}_1) & \dots &
\mat{C}(\vect{t}_N, \vect{t}_N)
\end{pmatrix}.

discretizeAndFactorize(*args)

Discretize and factorize the covariance function on a given mesh.

Parameters:
whereMesh or RegularGrid or Sample

Container of the discretization vertices.

Returns:
choleskyFactorTriangularMatrix

Lower triangular Cholesky factor \mat{L} of the covariance matrix, of size N\processDim \times N\processDim, such that \mat{C}_{1, \dots, N} = \mat{L}\Tr{\mat{L}}, where N is the number of vertices.

Notes

This method discretizes the model on the given Mesh, RegularGrid or Sample with the discretize() method and returns its Cholesky factor.

discretizeAndFactorizeHMatrix(*args)

Discretize and factorize the covariance function on a given mesh using HMatrix.

Parameters:
whereMesh or RegularGrid or Sample

Container of the discretization vertices.

hmatParamHMatrixParameters

Parameter values for the HMatrix.

Returns:
choleskyFactorHMatrix

Lower triangular Cholesky factor \mat{L} of the covariance matrix, of size N\processDim \times N\processDim, such that \mat{C}_{1, \dots, N} = \mat{L}\Tr{\mat{L}} when the factorization method is LLt (default), stored in hierarchical format (H-Matrix). With the LU or LDLt method, the result holds the factorization computed by that method instead.

Notes

This method is similar to the discretizeAndFactorize() method. It requires that the library has been compiled with HMAT support. It is helpful for very large discretization sizes because it compresses the data.

discretizeAndFactorizeHODLRMatrix(*args)

Discretize and factorize the covariance function on a given mesh using HODLRMatrix.

Parameters:
whereMesh or RegularGrid or Sample

Container of the discretization vertices.

hodlrParamHODLRMatrixParameters

Parameter values for the HODLR matrix.

Returns:
choleskyFactorHODLRMatrix

Lower triangular Cholesky factor \mat{L} of the covariance matrix, of size N\processDim \times N\processDim, such that \mat{C}_{1, \dots, N} = \mat{L}\Tr{\mat{L}}, stored in hierarchical format (HODLR), where N is the number of vertices.

Notes

This method is similar to the discretizeAndFactorize() method, but stores the result in a HODLRMatrix instead of a dense TriangularMatrix. It does not require any external library. It is helpful for very large discretization sizes because it compresses the data.

discretizeHMatrix(*args)

Discretize the covariance function on a given mesh using HMatrix.

Parameters:
whereMesh or RegularGrid or Sample

Container of the discretization vertices.

hmatParamHMatrixParameters

Parameter values for the HMatrix.

Returns:
covarianceMatrixHMatrix

Covariance matrix \mat{C}_{1, \dots, N} \in \cS_{N\processDim}^+(\Rset) of size N\processDim \times N\processDim, stored in hierarchical format (H-Matrix), where N is the number of vertices.

Notes

This method is similar to the discretize() method. It requires that the library has been compiled with HMAT support. It is helpful for very large discretization sizes because it compresses the data.

discretizeHODLRMatrix(*args)

Discretize the covariance function on a given mesh using HODLRMatrix.

Parameters:
whereMesh or RegularGrid or Sample

Container of the discretization vertices.

hodlrParamHODLRMatrixParameters

Parameter values for the HODLR matrix.

Returns:
covarianceMatrixHODLRMatrix

Covariance matrix \mat{C}_{1, \dots, N} \in \cS_{N\processDim}^+(\Rset) of size N\processDim \times N\processDim, stored in hierarchical format (HODLR), where N is the number of vertices.

Notes

This method is similar to the discretize() method, but stores the result in a HODLRMatrix instead of a dense CovarianceMatrix. It is helpful for very large discretization sizes because it compresses the data. It does not require any external library. The result must be factorized with the factorize() method before being used by solve() or logDeterminant().

discretizeRow(vertices, p)

Discretize the covariance function on a given mesh for a specific row.

Parameters:
verticesSample

Container of the discretization vertices (\vect{t}_0, \dots, \vect{t}_{N-1}).

pint, 0 \leq p \leq N - 1

Row index of the covariance matrix to discretize.

Returns:
resultSample

Sample of size N\processDim and dimension \processDim, whose i-th block of \processDim rows contains the covariance matrix \mat{C}(\vect{t}_p, \vect{t}_i), for i = 0, \dots, N-1.

Notes

When \processDim = 1, the result is a sample of size N and dimension 1 with entries C(\vect{t}_p, \vect{t}_i) = \mat{C}_{11}(\vect{t}_p, \vect{t}_i).

draw(*args)

Draw a specific component of the covariance model with input dimension 1.

Parameters:
rowIndexint, 0 \leq rowIndex < \processDim

Row index of the component to draw. Default value is 0.

columnIndexint, 0 \leq columnIndex < \processDim

Column index of the component to draw. Default value is 0.

tMinfloat

Lower bound t_{\min} of the range over which the model is plotted. Default value is CovarianceModel-DefaultTMin in ResourceMap.

tMaxfloat

Upper bound t_{\max} of the range over which the model is plotted. Default value is CovarianceModel-DefaultTMax in ResourceMap.

pointNumberint, pointNumber \geq 2

Number of points used to discretize the range [t_{\min}, t_{\max}]. Default value is CovarianceModel-DefaultPointNumber in ResourceMap.

asStationarybool

If True, the model is plotted as a function of the lag \tau = t - s when the model is stationary. If False, it is plotted as a function of (s, t). Default value is True.

correlationFlagbool

If True, the model is plotted as a correlation function. If False, it is plotted as a covariance function. Default value is False.

Returns:
graphGraph

A graph containing a unique curve if asStationary is True and if the model is actually stationary, or the iso-values of the model otherwise.

Notes

This method requires \domainDim = 1.

fourthOrderPartial(s, t)

Compute the fourth-order spatial derivatives of the (0, 0) output component of the covariance function.

Parameters:
s, tfloat or sequence of float

Multivariate index (\vect{s}, \vect{t}) \in \cD \times \cD. Each vector has dimension \domainDim. Scalars are accepted only if \domainDim = 1.

Returns:
fourthPoint

Fourth-order derivatives of the (0, 0) output component \mat{C}_{00}(\vect{s}, \vect{t}) with respect to \vect{s} \in \Rset^{\domainDim}, stored as a flat point of size \domainDim^4; for 0 \leq a, b, c, e < \domainDim, index a + \domainDim (b + \domainDim (c + \domainDim e)) holds \partial^4 \mat{C}_{00}(\vect{s}, \vect{t}) /
\partial s_a \partial s_b \partial s_c \partial s_e.

getActiveParameter()

Accessor to the active parameter set.

In the context of kriging, it allows one to choose which hyperparameters are tuned.

Returns:
activeIndices

Indices of the active parameters among the full parameter vector.

getAmplitude()

Get the amplitude parameter \vect{\sigma} of the covariance function.

Returns:
amplitudePoint

Amplitude parameter \vect{\sigma} \in
\Rset^{\processDim}. Its components are positive.

getClassName()

Accessor to the object’s name.

Returns:
class_namestr

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

getCovarianceModel()

Accessor to the underlying scalar covariance model.

Returns:
modelCovarianceModel

The underlying scalar covariance model.

getFullParameter()

Get the full parameters of the covariance function.

Returns:
parameterPoint

Full parameter vector, of size at least \domainDim + 1 + \processDim(\processDim + 1) / 2. In the base class, its components are, in order, the scale vector \vect{\theta}, the nugget factor \varepsilon_{nugget}, the amplitude vector \vect{\sigma} and the lower triangle of the spatial correlation matrix \mat{R}. Models may append model-specific parameters.

getFullParameterDescription()

Get the description of the full parameters of the covariance function.

Returns:
descriptionDescription

Description of the full parameter vector, in the order returned by getFullParameter().

getInputDimension()

Get the input dimension of the covariance function.

Returns:
inputDimensionint

Dimension \domainDim of the index domain \cD. It is such that \cD \subset \Rset^{\domainDim}.

getMarginal(*args)

Get the marginal covariance model.

Parameters:
indexint or sequence of int

Index or indices of the components of the process to keep.

Returns:
marginalCovarianceModel

Covariance model restricted to the selected components.

getName()

Accessor to the object’s name.

Returns:
namestr

The name of the object.

getNuggetFactor()

Accessor to the nugget factor.

The nugget factor \varepsilon_{nugget} is a dimensionless nonnegative parameter which models a noise on the observed values of the process. At \vect{s} = \vect{t}, it replaces the covariance matrix \mat{C}(\vect{s}, \vect{s}) by (1 + \varepsilon_{nugget}) \mat{C}(\vect{s}, \vect{s}).

Returns:
nuggetFactorfloat

Nugget factor \varepsilon_{nugget} \geq 0.

getOutputCorrelation()

Get the spatial correlation matrix \mat{R} of the covariance function.

Returns:
spatialCorrelationCorrelationMatrix

Spatial correlation matrix \mat{R} \in \cS_{\processDim}^+(\Rset) of size \processDim \times \processDim.

getOutputDimension()

Get the output dimension of the covariance function.

Returns:
outputDimensionint

Dimension \processDim of the process X. It is such that \mat{C}: \cD \times \cD \rightarrow
\cM_{\processDim \times \processDim}(\Rset).

getParameter()

Get the values of the active parameters of the covariance function.

Returns:
parameterPoint

Values of the n_p active parameters, in the order given by getParameterDescription().

Notes

The active parameters are selected by setActiveParameter() among the full parameters returned by getFullParameter().

getParameterDescription()

Get the description of the active parameters of the covariance function.

Returns:
descriptionParamDescription

Description of the active parameters, i.e. the components of getFullParameterDescription() selected by getActiveParameter().

getScale()

Get the scale parameter \vect{\theta} of the covariance function.

Returns:
scalePoint

Scale parameter \vect{\theta} \in
\Rset^{\domainDim} used in the covariance function. Its components are positive. For IsotropicCovarianceModel, the scale has a single component.

hasName()

Test if the object is named.

Returns:
hasNamebool

True if the name is not empty.

isDiagonal()

Test whether the model is diagonal.

Returns:
isDiagonalbool

True if the covariance matrix is diagonal, i.e.

\mat{C}(\vect{s}, \vect{t}) =
\diag\left(\mat{C}_{11}(\vect{s}, \vect{t}), \dots,
\mat{C}_{\processDim\processDim}(\vect{s}, \vect{t})\right).

isParallel()

Accessor to the parallel flag.

Returns:
isParallelbool

Whether the object is considered thread-safe.

isStationary()

Test whether the model is stationary.

Returns:
isStationarybool

True if the covariance function is invariant by translation.

Notes

The covariance function is stationary when it depends only on the lag \vect{\tau} = \vect{t} - \vect{s}:

\mat{C}(\vect{s}, \vect{t})
= \mat{C}^{stat}(\vect{t} - \vect{s}).

In that case, we note \mat{C}^{stat}(\vect{\tau}) for \mat{C}(\vect{s}, \vect{s} + \vect{\tau}).

parameterGradient(s, t)

Compute the gradient of the covariance function with respect to the active parameters.

Parameters:
s, tfloat or sequence of float

Multivariate index (\vect{s}, \vect{t}) \in \cD \times \cD. Each vector has dimension \domainDim. Scalars are accepted only if \domainDim = 1.

Returns:
gradientMatrix

Gradient of the covariance function \mat{C}(\vect{s}, \vect{t}) with respect to the n_p active parameters \pi_1, \dots, \pi_{n_p}, in the order given by getParameterDescription(). Its size is n_p \times \processDim^2. For 0 \leq k < n_p and 0 \leq i, j < \processDim, row k and column i + \processDim j hold \partial \mat{C}_{ij}(\vect{s}, \vect{t}) /
\partial \pi_k. The \processDim \times \processDim matrix \partial \mat{C}(\vect{s}, \vect{t}) / \partial \pi_k associated with each row is thus flattened column by column.

parameterHessian(s, t)

Compute the mixed parameter-spatial Hessian of the (0, 0) output component of the covariance function.

Parameters:
s, tfloat or sequence of float

Multivariate index (\vect{s}, \vect{t}) \in \cD \times \cD. Each vector has dimension \domainDim. Scalars are accepted only if \domainDim = 1.

Returns:
hessianMatrix

Derivatives of the partial Hessian \partial^2 \mat{C}_{00}(\vect{s}, \vect{t}) /
\partial s_a \partial s_b of the (0, 0) output component with respect to the n_p active parameters \pi_1, \dots, \pi_{n_p}, in the order given by getParameterDescription(). Its size is n_p \times \domainDim^2. For 0 \leq k < n_p and 0 \leq a, b < \domainDim, row k and column a + \domainDim b hold \partial^3 \mat{C}_{00}(\vect{s}, \vect{t}) /
\partial \pi_k \partial s_a \partial s_b. The \domainDim \times \domainDim partial Hessian associated with each row is thus flattened column by column.

partialGradient(s, t)

Compute the gradient of the covariance function with respect to the first index \vect{s}.

Parameters:
s, tfloat or sequence of float

Multivariate index (\vect{s}, \vect{t}) \in \cD \times \cD. Each vector has dimension \domainDim. Scalars are accepted only if \domainDim = 1.

Returns:
gradientMatrix

Gradient of the covariance function \mat{C}(\vect{s}, \vect{t}) with respect to \vect{s} \in \Rset^{\domainDim}. Its size is \domainDim \times \processDim^2. For 0 \leq a < \domainDim and 0 \leq i, j < \processDim, row a and column i + \processDim j hold \partial \mat{C}_{ij}(\vect{s}, \vect{t}) / \partial s_a. The \processDim \times \processDim matrix \partial \mat{C}(\vect{s}, \vect{t}) / \partial s_a associated with each row is thus flattened column by column.

partialHessian(s, t)

Compute the Hessian of the (0, 0) output component of the covariance function with respect to the first index \vect{s}.

Parameters:
s, tfloat or sequence of float

Multivariate index (\vect{s}, \vect{t}) \in \cD \times \cD. Each vector has dimension \domainDim. Scalars are accepted only if \domainDim = 1.

Returns:
hessianSymmetricMatrix

Hessian of the (0, 0) output component \mat{C}_{00}(\vect{s}, \vect{t}) with respect to \vect{s} \in \Rset^{\domainDim}. Its size is \domainDim \times \domainDim; entry (a, b) holds \partial^2 \mat{C}_{00}(\vect{s}, \vect{t}) /
\partial s_a \partial s_b. The other output components are not differentiated.

setActiveParameter(active)

Accessor to the active parameter set.

This method defines which hyperparameters are tuned.

Parameters:
activesequence of int

Indices of the active parameters among the full parameter vector.

Notes

The indices refer to the full parameter vector returned by getFullParameter(). In order to get the position of a parameter known by its name, first call the method getFullParameterDescription() and then use the index method of the returned Description, as shown in the following example.

Examples

For example, we create a MaternModel covariance model. By default, only the scale and the amplitude parameters are active and will be estimated. We want to add the estimation of the \nu parameter.

>>> import openturns as ot
>>> covModel = ot.MaternModel()

We get the default active parameters description: we can see that the \nu parameter is not included in the list.

>>> covModel.getParameterDescription()
[scale_0,amplitude_0]

We now get the active parameters. The parameter \nu is not in the list.

>>> active = covModel.getActiveParameter()
>>> print(active)
[0,2]

We want to search the index associated to the parameter \nu in the full list of the parameters indices.

>>> activeDesc = covModel.getFullParameterDescription()
>>> print(activeDesc)
[scale_0,nuggetFactor,amplitude_0,nu]
>>> index = activeDesc.index('nu')
>>> print(index)
3

Now, we add the index of \nu in the initial list of active parameters. We sort the active indices by increasing order. Then we update the list of the active parameters.

>>> active = covModel.getActiveParameter()
>>> active.add(index)
>>> covModel.setActiveParameter(sorted(active))

Check that the parameter \nu is in the active parameters list!

>>> covModel.getActiveParameter()
[0,2,3]
>>> covModel.getFullParameterDescription()
[scale_0,nuggetFactor,amplitude_0,nu]
setAmplitude(amplitude)

Set the amplitude parameter \vect{\sigma} of the covariance function.

Parameters:
amplitudePoint

Amplitude parameter \vect{\sigma} \in
\Rset^{\processDim} to be used in the covariance function. Its size must be equal to \processDim and its components must be positive.

setFullParameter(parameter)

Set the full parameters of the covariance function.

Parameters:
parameterPoint

Full parameter vector. In the base class, its components are, in order:

  • the scale vector \vect{\theta} \in
\Rset^{\domainDim};

  • the nugget factor \varepsilon_{nugget} \geq 0;

  • the amplitude vector \vect{\sigma} \in
\Rset^{\processDim};

  • the lower triangle of the spatial correlation matrix \mat{R} \in \cS_{\processDim}^+([-1, 1]), i.e. \processDim(\processDim - 1) / 2 values.

Its size is therefore at least \domainDim + 1 + \processDim(\processDim + 1) / 2. Models may append model-specific parameters.

setName(name)

Accessor to the object’s name.

Parameters:
namestr

The name of the object.

setNuggetFactor(nuggetFactor)

Set the nugget factor for the variance of the observation error.

Parameters:
nuggetFactorfloat, \varepsilon_{nugget} \geq 0

Nugget factor.

Notes

The nugget factor represents a noise observed in the output values of the process. At \vect{s} = \vect{t}, it replaces the covariance matrix \mat{C}(\vect{s}, \vect{s}) by (1 + \varepsilon_{nugget}) \mat{C}(\vect{s}, \vect{s}).

Refer to Covariance models to get more details on covariance models and the introduction of a nugget factor, and in particular see equation (5).

setOutputCorrelation(correlation)

Set the spatial correlation matrix \mat{R} of the covariance function.

Parameters:
spatialCorrelationCorrelationMatrix

Spatial correlation matrix \mat{R} \in \cS_{\processDim}^+([-1, 1]).

setParameter(parameter)

Set the values of the active parameters of the covariance function.

Parameters:
parameterPoint

Values of the n_p active parameters, in the order given by getParameterDescription().

setScale(scale)

Set the scale parameter \vect{\theta} of the covariance function.

Parameters:
scalePoint

Scale parameter \vect{\theta} \in
\Rset^{\domainDim} to be used in the covariance function. Its size must be equal to \domainDim and its components must be positive.

thirdOrderPartial(s, t)

Compute the third-order spatial derivatives of the (0, 0) output component of the covariance function.

Parameters:
s, tfloat or sequence of float

Multivariate index (\vect{s}, \vect{t}) \in \cD \times \cD. Each vector has dimension \domainDim. Scalars are accepted only if \domainDim = 1.

Returns:
thirdPoint

Third-order derivatives of the (0, 0) output component \mat{C}_{00}(\vect{s}, \vect{t}) with respect to \vect{s} \in \Rset^{\domainDim}, stored as a flat point of size \domainDim^3; for 0 \leq a, b, c < \domainDim, index a + \domainDim (b + \domainDim c) holds \partial^3 \mat{C}_{00}(\vect{s}, \vect{t}) /
\partial s_a \partial s_b \partial s_c.