# FractionalBrownianMotionModel¶

class FractionalBrownianMotionModel(*args)

Multivariate fractional Brownian motion covariance function.

Available constructors:

FractionalBrownianMotionModel()

FractionalBrownianMotionModel(scale, amplitude, exponent)

FractionalBrownianMotionModel(scale, amplitude, exponent, eta, rho)

Parameters: scale : positive float Correlation scale between two locations. amplitude : sequence of positive floats Standard deviations of the model . exponent : sequence of float, Hurst exponents of the model, ie homogeneity degrees of the self-similarity property. eta : SquareMatrix Disymmetry matrix. This matrix expresses the antisymmetric part of the dependence between the components of the model. It is antisymmetric, only its strictly lower part is addressed. rho : CorrelationMatrix Correlation matrix. This matrix expresses the symmetric part of the dependence between the components of the model.

CovarianceModel

Notes

The multivariate fractional Brownian motion model is a nonstationary covariance function of input dimension 1 defined by:

for and:

for , where is the Hurst exponent of the -th component and its amplitude. Not that the scale coefficient simplifies in the antisymmetric part when . The compatibility conditions between the vector of exponents, the correlation matrix and the disymmetry matrix are quite evolved, see [Amblard2012].

Examples

Create a standard fractional Brownian motion covariance, corresponding to the univariate standard Brownian motion:

>>> import openturns as ot
>>> covModel = ot.FractionalBrownianMotionModel()
>>> s = 0.1
>>> t = 0.2
>>> print(covModel(s, t))
[[ 0.223607 ]]

Create an univariate fractional Brownian motion covariance:

>>> covModel2 = ot.FractionalBrownianMotionModel(0.5, 1.5, 0.25)

Create a multivariate fractional Brownian motion covariance:

>>> covModel3 = ot.FractionalBrownianMotionModel(0.5, [1.5, 1.0], [0.25, 0.6], ot.SquareMatrix([[0.0, 0.2], [-0.2, 0.0]]), ot.CorrelationMatrix([[1.0, 0.5], [0.5, 1.0]]))

Methods

 __call__(*args) Evaluate the covariance function. computeAsScalar(s, t) Compute the covariance function for scalar model. computeStandardRepresentative(s, t) Compute the standard representative function of the covariance model. 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. discretizeHMatrix(*args) Discretize the covariance function on a given mesh using HMatrix result. discretizeRow(vertices, p) (TODO) draw(*args) Draw a specific component of the covariance model with input dimension 1. getActiveParameter() Accessor to the active parameter set. getAmplitude() Get the amplitude parameter of the covariance function. getClassName() Accessor to the object’s name. getEta() Eta accessor. getExponent() Exponent accessor. getFullParameter() Get the full parameters of the covariance function. getFullParameterDescription() Get the description full parameters of the covariance function. getId() Accessor to the object’s id. getInputDimension() Get the input dimension of the covariance function. getMarginal(*args) Get the ith marginal of the model. getName() Accessor to the object’s name. getNuggetFactor() Accessor to the nugget factor. getOutputCorrelation() Get the spatial correlation matrix of the covariance function. getOutputDimension() Get the dimension of the covariance function. getParameter() Get the parameters of the covariance function. getParameterDescription() Get the description of the covariance function parameters. getRho() Rho accessor. getScale() Get the scale parameter of the covariance function. getShadowedId() Accessor to the object’s shadowed id. getVisibility() Accessor to the object’s visibility state. hasName() Test if the object is named. hasVisibleName() Test if the object has a distinguishable name. isDiagonal() Test whether the model is diagonal or not. isStationary() Test whether the model is stationary or not. parameterGradient(s, t) Compute the gradient according to the parameters. partialGradient(s, t) Compute the gradient of the covariance function. setActiveParameter(active) Accessor to the active parameter set. setAmplitude(amplitude) Set the amplitude parameter of the covariance function. setExponentEtaRho(exponent, eta, rho) Multivariate parameters accessor. 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 regularization. setOutputCorrelation(correlation) Set the spatial correlation matrix of the covariance function. setParameter(parameter) Set the parameters of the covariance function. setScale(scale) Set the scale parameter of the covariance function. setShadowedId(id) Accessor to the object’s shadowed id. setVisibility(visible) Accessor to the object’s visibility state.
__init__(*args)

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

computeAsScalar(s, t)

Compute the covariance function for scalar model.

Available usages:

computeAsScalar(s, t)

computeAsScalar(tau)

Parameters: s, t : sequences of float Multivariate index tau : sequence of float Multivariate index covariance : float Covariance.

Notes

The method makes sense only if the dimension of the process is . It evaluates .

In the second usage, the covariance model must be stationary. Then we note for as this quantity does not depend on .

computeStandardRepresentative(s, t)

Compute the standard representative function of the covariance model.

Available usages:

computeStandardRepresentative(s, t)

computeStandardRepresentative(tau)

Parameters: s, t : sequences of float Multivariate index tau : float or sequence of float Multivariate index rho : float Correlation model

Notes

It evaluates the scalar function or if the model is stationary.

discretize(*args)

Discretize the covariance function on a given mesh.

Parameters: meshOrGrid : Mesh or time grid of size associated with the process. covarianceMatrix : CovarianceMatrix Covariance matrix (if the process is of dimension

Notes

This method makes a discretization of the model on meshOrGrid composed of the vertices and returns the covariance matrix:

discretizeAndFactorize(*args)

Discretize and factorize the covariance function on a given mesh.

Parameters: meshOrGrid : Mesh or time grid of size associated with the process. CholeskyMatrix : TriangularMatrix Cholesky factor of the covariance matrix (if the process is of dimension ).

Notes

This method makes a discretization of the model on meshOrGrid composed of the vertices thanks to the discretize method and returns its Cholesky factor.

discretizeAndFactorizeHMatrix(*args)

Discretize and factorize the covariance function on a given mesh.

This uses HMatrix.

Parameters: meshOrGrid : Mesh or time grid of size associated with the process. nuggetFactor: float Nugget factor to be added to the discretized matrix hmatParam : HMatrixParameters Parameter values for the HMatrix HMatrix : HMatrix Cholesk matrix (if the process is of dimension ), stored in hierarchical format (H-Matrix)

Notes

This method si similar to the discretizeAndFactorize method. This method requires that OpenTURNS has been compiled with the hmat library. The method is helpfull for very large parameters (Mesh, grid, Sample) as its compress data.

discretizeHMatrix(*args)

Discretize the covariance function on a given mesh using HMatrix result.

Parameters: meshOrGrid : Mesh or time grid of size associated with the process. nuggetFactor: float Nugget factor to be added to the discretized matrix hmatParam : HMatrixParameters Parameter values for the HMatrix HMatrix : HMatrix Covariance matrix (if the process is of dimension ), stored in hierarchical format (H-Matrix)

Notes

This method si similar to the discretize method. This method requires that OpenTURNS has been compiled with the hmat library. The method is helpfull for very large parameters (Mesh, grid, Sample) as its compress data.

discretizeRow(vertices, p)

(TODO)

draw(*args)

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

Parameters: rowIndex : int, The row index of the component to draw. Default value is 0. columnIndex: int, :math:0 leq columnIndex < dimension The column index of the component to draw. Default value is 0. tMin : float The lower bound of the range over which the model is plotted. Default value is CovarianceModel-DefaultTMin in ResourceMap. tMax : float The upper bound of the range over which the model is plotted. Default value is CovarianceModel-DefaultTMax in ResourceMap. pointNumber : int, The discretization of the range over which the model is plotted. Default value is CovarianceModel-DefaultPointNumber in class:~openturns.ResourceMap. asStationary : bool Flag to tell if the model has to be plotted as a stationary model, ie as a function of the lag if equals to True, or as a non-stationary model, ie as a function of if equals to False. Default value is True. correlationFlag : bool Flag to tell if the model has to be plotted as a correlation function if equals to True or as a covariance function if equals to False. Default value is False. graph : Graph A graph containing a unique curve if asStationary=True and if the model is actually a stationary model, or containing the iso-values of the model if asStationary=False or if the model is nonstationary.
getActiveParameter()

Accessor to the active parameter set.

Returns: active : Indices Indices of the active parameters.
getAmplitude()

Get the amplitude parameter of the covariance function.

Returns: amplitude : Point The amplitude parameter of the covariance function.
getClassName()

Accessor to the object’s name.

Returns: class_name : str The object class name (object.__class__.__name__).
getEta()

Eta accessor.

Returns: eta : 2-d sequence of floats Disymmetry matrix. This matrix express the antisymmetric part of the dependence between the components of the model. It is antisymmetric, only its strictly lower part is addressed.
getExponent()

Exponent accessor.

Returns: exponent : seqence of float, Define the Hurst exponents of the components.
getFullParameter()

Get the full parameters of the covariance function.

Returns: parameter : Point List the full parameter of the covariance function i.e. scale parameter , the the amplitude parameter , the Spatial correlation parameter ; and potential other parameter depending on the model;
getFullParameterDescription()

Get the description full parameters of the covariance function.

Returns: description : Description Description of the full parameter of the covariance function.
getId()

Accessor to the object’s id.

Returns: id : int Internal unique identifier.
getInputDimension()

Get the input dimension of the covariance function.

Returns: inputDimension : int Spatial dimension of the covariance function.
getMarginal(*args)

Get the ith marginal of the model.

Returns: marginal : int or sequence of int index of marginal of the model.
getName()

Accessor to the object’s name.

Returns: name : str The name of the object.
getNuggetFactor()

Accessor to the nugget factor.

This parameter allows smooth predictions from noisy data. The nugget is added to the diagonal of the assumed training covariance (thanks to discretize) and acts as a Tikhonov regularization in the problem.

Returns: nuggetFactor : float Nugget factor used for the regularization of the discretized covariance matrix.
getOutputCorrelation()

Get the spatial correlation matrix of the covariance function.

Returns: spatialCorrelation : CorrelationMatrix Correlation matrix .
getOutputDimension()

Get the dimension of the covariance function.

Returns: d : int Dimension such that This is the dimension of the process .
getParameter()

Get the parameters of the covariance function.

Returns: parameters : Point List of the scale parameter and the amplitude parameter of the covariance function. The other specific parameters are not included.
getParameterDescription()

Get the description of the covariance function parameters.

Returns: descriptionParam : Description Description of the components of the parameters obtained with the getParameter method..
getRho()

Rho accessor.

Returns: rho : 2-d sequence of floats Correlation matrix. This matrix express the symmetric part of the dependence between the components of the model.
getScale()

Get the scale parameter of the covariance function.

Returns: scale : Point The scale parameter used in the covariance function.

Accessor to the object’s shadowed id.

Returns: id : int Internal unique identifier.
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.
isDiagonal()

Test whether the model is diagonal or not.

Returns: isDiagonal : bool True if the model is diagonal.
isStationary()

Test whether the model is stationary or not.

Returns: isStationary : bool True if the model is stationary.

Notes

The covariance function is stationary when it is invariant by translation:

We note for .

Compute the gradient according to the parameters.

Parameters: s, t : sequences of float Multivariate index . gradient : Matrix Gradient of the function according to the parameters.

Compute the gradient of the covariance function.

Parameters: s, t : floats or sequences of float Multivariate index . gradient : Matrix Gradient of the covariance function.
setActiveParameter(active)

Accessor to the active parameter set.

Parameters: active : sequence of int Indices of the active parameters.
setAmplitude(amplitude)

Set the amplitude parameter of the covariance function.

Parameters: amplitude : Point The amplitude parameter to be used in the covariance function. Its size must be equal to the dimension of the covariance function.
setExponentEtaRho(exponent, eta, rho)

Multivariate parameters accessor.

Parameters: exponent : sequence of float, Define the Hurst exponents of the components. eta : 2-d sequence of floats Disymmetry matrix. This matrix express the antisymmetric part of the dependence between the components of the model. It is antisymmetric, only its strictly lower part is addressed. rho : 2-d sequence of floats Correlation matrix. This matrix express the symmetric part of the dependence between the components of the model.
setFullParameter(parameter)

Set the full parameters of the covariance function.

Parameters: parameter : Point List the full parameter of the covariance function i.e. scale parameter , the the amplitude parameter , the Spatial correlation parameter ; and potential other parameter depending on the model; Must be at least of dimension .
setName(name)

Accessor to the object’s name.

Parameters: name : str The name of the object.
setNuggetFactor(nuggetFactor)

Set the nugget factor for the regularization.

Acts on the discretized covariance matrix.

Parameters: nuggetFactor : float nugget factor to be used for the regularization of the discretized covariance matrix.
setOutputCorrelation(correlation)

Set the spatial correlation matrix of the covariance function.

Parameters: spatialCorrelation : CorrelationMatrix Correlation matrix .
setParameter(parameter)

Set the parameters of the covariance function.

Parameters: parameters : Point List of the scale parameter and the amplitude parameter of the covariance function. Must be of dimension .
setScale(scale)

Set the scale parameter of the covariance function.

Parameters: scale : Point The scale parameter to be used in the covariance function. Its size must be equal to the input dimension of the covariance function.