We propose an effective and fast method to simulate multidimensional conditional fractional Gaussian fields with the package FieldSim. Our method is valid not only for conditional simulations associated to fractional Brownian fields, but to any Gaussian field and on any (non regular) grid of points.
Rough phenomena arise in texture simulations for image processing or
medical imaging, natural scenes simulations (clouds, mountains) and
geophysical morphology modeling, financial mathematics, ethernet
traffic, etc. Some are time-indexed, some others, like texture or
natural scene simulations, should be indexed by subsets of the Euclidean
spaces
The fractional Brownian motion (fBm), introduced by (Kolmogorov 1940) (and developed by Mandelbrot and Van Ness (1968)) is nowadays widely used to model this roughness. Fractional Brownian motions have been extended in many directions: higher dimensions with fields, anisotropy, multifractionality, etc. This paper is devoted to a simulation method for conditional Gaussian fields. This could improve, in the future, natural scene simulations by fixing for instance the valleys.
The simulation of fractional Gaussian processes is not difficult in
dimension one (see a review of Coeurjolly (2000)). Let us recall the numerical
complexity of some classical methods: the Cholesky method has a
complexity of
In higher dimensions, the Wood and Chan method has been extended to stationary increments fields with the Stein’s method (Stein 2002) ; the fractional Brownian field can therefore be simulated on a regular grid of the plane. For general Gaussian fields on a general discrete grid, the Cholesky method is costly and exact simulations are no longer tractable. Approximate methods have been intensively developed (midpoint, Peitgen and Saupe (1988); turning bands, Yin (1996); truncated wavelet decomposition) but for specific fields. On manifolds, simulation procedures based on truncated series of eigenfunctions of the Laplace-Beltrami operator are discussed in (Gelbaum and Titus 2014).
Our approach, presented in Brouste et al. (2007, 2010), is based on a 2-steps method
with an exact simulation step plus a refined fast step, that is an
improvement of the midpoint method. It has been implemented in the
FieldSim package
(Brouste and Lambert-Lacroix. 2015). The fieldsim simulation method can be applied to general
Gaussian processes on general simulation grids (regular and non regular)
on Euclidean spaces and even on some manifolds (see Figure 1).
It is worth mentioning that another package,
RandomFields
(Schlather et al. 2016), allows the simulation of a large class of random fields
such as Gaussian random fields, Poisson fields, binary fields,
chi-square fields, RMuser()
and RFsimulate()
commands of the
RandomFields package. It may be noted that the FieldSim package does
not allow for the simulation of more than the RandomFields package.
FieldSim package is an alternative in which the underlying methods of
simulation are generic.
We propose here to adapt the FieldSim package
to conditional simulations. Definitions and
notation will be introduced in the following
section with the “process” class, the setProcess
procedure and the
fieldsim
procedure. The fieldsim
procedure adapted to conditional
Gaussian fields is described in the next section.
Simulations with the package FieldSim are presented in the last
section.
Let
The covariance function
Different classical fractional Gaussian fields have been simulated to
illustrate the FieldSim package in (Brouste et al. 2007, 2010). In the sequel,
The standard fractional Brownian fields are defined through their
covariance function (e.g., Samorodnitsky and Taqqu (1994)):
The standard multifractional Brownian fields are defined through their covariance function (see Peltier and Levy-Véhel (1996; Benassi et al. 1997)):
The standard fractional Brownian sheets are defined through their
covariance function (see Kamont (1996)):
The anisotropic fractional Brownian fields are defined through their
covariance function (see Bonami and Estrade (2003)):
In the new version 3.2 of the package FieldSim, new features have been
added. The most important add is the “process” class and the
setProcess
function.
An object of class “process” has different slots:
The name
of the process. Several names are reserved for classical
fractional Gaussian processes: see Table 1 for details.
"cond"
is used for all kind of conditional
simulations (see further).
The slot values
stores the values of the process on the simulation
(and visualization) grid.
An object of class “manifold” which is the Riemannian manifold on which the process is lying; an object of the class “manifold” has four slots:
name
which is the name of the manifold we consider. The name
"line"
, "plane"
, "sphere"
and "hyperboloid"
are taken
for the eponymous manifolds.
atlas
which is the union of
discretized domains that cover the
manifold (must be a matrix where the number of rows is the
dimension of the space where the manifold lives).
distance
which is the distance considered on the manifold.
origin
which is the origin considered on the manifold (must be
a point on the manifold).
The setter setManifold
permits the user to create an object of
class “manifold” with all its slots. This class is already described
in Brouste et al. (2010).
The slot covf
which contains the
covariance function of the Gaussian process.
The slot parameter
which contains all the
parameters associated to the covariance function of the process.
Here are the classical parameters associated
to the classical process.
All the examples presented can be defined with the setProcess
command
(see Table 1). With the following command, the user can set
a fBm with Hurst parameter 0.7 on a regular grid of the interval
R> linefBm <- setProcess("fBm-line", 0.7)
R> str(linefBm)
Formal class 'process' [package "FieldSim"] with 7 slots
..@ name : chr "fBm"
..@ values : num 0
..@ manifold :Formal class 'manifold' [package "FieldSim"] with 4 slots
.. .. ..@ name : chr "line"
.. .. ..@ atlas : num [1, 1:256] 0 0.00392 0.00784 0.01176 0.01569 ...
.. .. ..@ distance:function (xi, xj)
.. .. ..@ origin : num [1, 1] 0
..@ covf :function (xi, xj)
..@ parameter: num 0.7
..@ values2 : num 0
..@ manifold2:Formal class 'manifold' [package "FieldSim"] with 4 slots
.. .. ..@ name : chr "line"
.. .. ..@ atlas : num [1, 1:256] 0 0.00392 0.00784 0.01176 0.01569 ...
.. .. ..@ distance:function (xi, xj)
.. .. ..@ origin : num [1, 1] 0
It is worth mentioning that the slot values
is empty since there is no
simulation done. Then as usual, the user can use the fieldsim
function
in order to simulate the Gaussian process associated to covf
on the
manifold grid defined in manifold
.
R> fieldsim(linefBm)
In the fieldsim
function, we can add the quantity Ne
, the number of
points of the grid to be simulated in the exact step, and nbNeighbor
,
the number of neighbors used in the refined step. By default, Ne
is
equal to the size of the grid given in atlas
. The slot values
are
now set with the simulated values. There exist different visualization
procedures to draw the results, for instance:
R> plot(linefbm, "default")
We recall that the discretization grids can be modified with the
setAtlas
command. Depending on the manifold, there are several types
of grids: "regular"
, "random"
and "visualization"
. For instance,
R> setAtlas(linefBm, "regular", 1000)
R> fieldsim(linefBm)
R> plot(linefBm, "default")
fieldsim
procedure for conditional Gaussian fieldsIn order to build conditional fractional Gaussian
fields, we consider a conditioning set
Lemma 1. *Let us consider the centered Gaussian vector
In the Gaussian field context, Lemma 1 allows us to write
down an explicit expression of the mean function and the autocovariance
function of the conditional Gaussian field
associated to
Then the autocovariance function of a conditional Gaussian
field (using the
Let us recall that the goal of this paper is to give a procedure that
yields discretization of the sample path of the conditional Gaussian
field over a space discretization
Given a space discretization
Let
Finally, we compute
For storage and computing time, the accurate simulation step must concern only a small number of variables whereas the second step can relate to a larger number of variables. That leads to an effective and fast method to simulate any Gaussian field.
It is worth mentioning that the setProcess
command will check if
We focus, in this paper, on the conditional Gaussian fields associated to the previously mentioned fields but every other classical Gaussian field can be also simulated: standard bifractional Brownian motion, space-time deformed fractional Brownian motion, etc. (see Brouste et al. (2007)). We also consider conditional simulations associated to fractional Gaussian fields on manifolds (hyperboloid and sphere) (see Brouste et al. (2010) for the covariance function definition).
The procedure fieldsim
is extended to the conditional Gaussian
fields. We can find the setProcess
reference
short-card in Table 1.
The fractional Gaussian processes on the line are fast to simulate.
Conditional simulations associated to fractional
Brownian motion (fBm) and multifractional Brownian motion (mBm) and to
the conditioning set
They can be obtained with the fieldsim
procedure. For instance, the
mBm in Figure 2 is obtained with:
R> funcH <- function(x) 0.3 + x * 0.6
R> cond.mBm <- setProcess("cond-mBm-line",
+ list(Gamma = matrix(c(1/2, 1, 3/4, 0.5, 1, 0), 2, 3), par = funcH))
R> fieldsim(cond.mBm)
R> plot(cond.mBm)
In the simulation below, the points of the set
R> atlas.cond.mBm <- sort(c(cond.mBm@manifold@atlas[1, ], 1/6))
R> cond.mBm@manifold@atlas <- matrix(atlas.mBm, nrow = 1)
Another solution is to use finer grids which contain the points of the
set
Conditional simulations associated to a
fractional Brownian field (for
All the processes are simulated on a regular grid of 4096 points of
R> Ng <- 2^6 + 1
R> x <- seq(from = 0, to = 1, length = Ng)
R> G <- cbind(rbind(rep(1, Ng - 1), x[2:Ng], rep(0, Ng - 1)),
+ rbind(x[2:(Ng - 1)], rep(1, Ng - 2), rep(0, Ng - 2)))
R> condfBm2d <- setProcess("cond-afBf-plane",
+ list(Gamma = G, par = list(H = 0.7, theta1 = pi/6, theta2 = pi/3)))
R> setAtlas(condfBm2d, "visualization", 6)
R> fieldsim(condfBm2d, Ne = 100, nbNeighbor = 4)
R> plot(condfBm2d, theta = 120, phi = 30, expand = 0.5)
It is worth emphasizing that, for a fixed size of the simulation grid,
the simulation time of the fieldsim
procedure depends on the number of
conditioning points (see for instance the fractional Brownian field on
Figures 3 and 6 for 129 and 39 conditioning
points respectively). But this variation is small compared to the
variation due to the size of the simulation grid.
Conditional simulations can be extended to
fractional Gaussian fields on manifolds associated to the fractional
Brownian field on the hyperboloid with
The conditional simulations associated to the fractional Brownian field on the sphere (see Figure 5) are obtained with
R> Gamma <- matrix(c(0, 0, 1, 5, 0.5, 0, sqrt(3)/2, -5), 4, 2)
R> sphere.cond.fBm <- setProcess("cond-fBm-sphere", list(Gamma = Gamma, par = 0.4))
R> setAtlas(sphere.cond.fBm, "visualization", 30)
R> fieldsim(sphere.cond.fBm, Ne = 100, nbNeighbor = 4)
R> plot(sphere.cond.fBm)
We propose a generic method to simulate multidimensional conditional fractional Gaussian fields.
Our method is valid for any Gaussian field and on any (non regular) grid of points as soon as the covariance function is available. This method is constructed to be universal (conditional simulation, simulation on a manifold) and is consecutively not as fast as other methods defined for specific fields. In the near future, the FieldSim package should also possess such specific methods.
Our method is adapted to conditional simulations and, consequently, permits now to simulate easily several natural scenes (clouds, mountains) with valleys and fixed topographic points. Such a simulation is presented in Figure 6.
name of the process |
parameter |
---|---|
On |
|
"fBm-line" | numeric |
"mBm-line" | function |
"2pfBm-line" | list(H = numeric, K = numeric) |
"stdfBm-line" | list(H = numeric, sigma = function, tau = function) |
"cond-fBm-line" | list(Gamma = matrix, par = numeric) |
"cond-mBm-line" | list(Gamma = matrix, par = function) |
"cond-2pfBm-line" | list(Gamma = matrix, par = list(H = numeric, K = numeric)) |
On the square |
|
"fBm-plane" | numeric |
"mBm-plane" | function |
"2pfBm-plane" | list(H = numeric, K = numeric) |
"afBf-plane" | list(H = numeric, theta1 = numeric, theta2 = numeric) |
"fBs-plane" | vector |
"cond-fBm-plane" | list(Gamma = matrix, par = numeric) |
"cond-mBm-line" | list(Gamma = matrix, par = function) |
"cond-afBf-plane" | list(Gamma = matrix, par = list(H = numeric, theta1 = numeric, |
theta2 = numeric)) |
|
"cond-fBs-line" | list(Gamma = matrix, par = vector) |
On the hyperboloid | |
"fBm-hyperboloid" | numeric |
"cond-fBm-hyperboloid" | list(Gamma = matrix, par = numeric) |
This article is converted from a Legacy LaTeX article using the texor package. The pdf version is the official version. To report a problem with the html, refer to CONTRIBUTE on the R Journal homepage.
Text and figures are licensed under Creative Commons Attribution CC BY 4.0. The figures that have been reused from other sources don't fall under this license and can be recognized by a note in their caption: "Figure from ...".
For attribution, please cite this work as
Brouste, et al., "Conditional Fractional Gaussian Fields with the Package FieldSim", The R Journal, 2016
BibTeX citation
@article{RJ-2016-003, author = {Brouste, Alexandre and Istas, Jacques and Lambert-Lacroix, Sophie}, title = {Conditional Fractional Gaussian Fields with the Package FieldSim}, journal = {The R Journal}, year = {2016}, note = {https://rjournal.github.io/}, volume = {8}, issue = {1}, issn = {2073-4859}, pages = {38-47} }