# \[ANN\] Random field generation with GaussianRandomFields.jl

**URL:** <https://discourse.julialang.org/t/ann-random-field-generation-with-gaussianrandomfields-jl/8733>\
**Category:** Community\
**Tags:** package, announcement\
**Created:** [February 1, 2018, 10:29am UTC](https://discourse.julialang.org/t/ann-random-field-generation-with-gaussianrandomfields-jl/8733 "2018-02-01T10:29:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![PieterjanRobbe](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pieterjanrobbe/32/3298_2.png) [@PieterjanRobbe](https://discourse.julialang.org/u/PieterjanRobbe)\
**Post date:** [February 1, 2018, 10:29am UTC](https://discourse.julialang.org/t/ann-random-field-generation-with-gaussianrandomfields-jl/8733/1 "2018-02-01T10:29:05Z")

</div>

Dear Julia friends

It is my pleasure to present [GaussianRandomFields](https://github.com/PieterjanRobbe/GaussianRandomFields.jl), a package for generating [Gaussian random fields](https://en.wikipedia.org/wiki/Random_field) in arbitrary dimension. These random fields can for example be used as input data for PDEs with random coefficients. A simulation of such a PDE typically requires many samples from the random field, that must be computed efficiently. Here’s an excerpt from the documentation, listing some key features:

- Support for stationary (isotropic and anisotropic) and separable non-stationary covariance functions.
- Default implementation of most standard covariance functions such as Gaussian, Exponential and Matérn covariances. Adding a user-defined covariance function is very easy.
- Implementation of most common methods to generate Gaussian random fields: Cholesky factorization, Karhunen-Loève expansion and circulant embedding.
- Easy generation of Gaussian random fields defined on a Finite Element mesh.
- Versatile plotting features for easy visualisation of Gaussian random fields.

Many examples and some nice pictures can found in the [tutorial](https://github.com/PieterjanRobbe/GaussianRandomFields.jl/blob/master/tutorial/tutorial.ipynb). This is a small teaser:

 ![front](https://global.discourse-cdn.com/julialang/original/3X/b/b/bb53c6a6d43be1602e5a199c0936cfbf9c27401e.png)

Any comments or remarks are highly appreciated!

Pieterjan

---

<div class="post-metadata">

**Author:** ![mauro3](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mauro3/32/292_2.png) [@mauro3](https://discourse.julialang.org/u/mauro3)\
**Post date:** [February 1, 2018, 2:56pm UTC](https://discourse.julialang.org/t/ann-random-field-generation-with-gaussianrandomfields-jl/8733/2 "2018-02-01T14:56:10Z")

</div>

Cool! How does it compare to [https://github.com/STOR-i/GaussianProcesses.jl](https://github.com/STOR-i/GaussianProcesses.jl)?

---

<div class="post-metadata">

**Author:** ![PieterjanRobbe](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pieterjanrobbe/32/3298_2.png) [@PieterjanRobbe](https://discourse.julialang.org/u/PieterjanRobbe)\
**Post date:** [February 1, 2018, 9:26pm UTC](https://discourse.julialang.org/t/ann-random-field-generation-with-gaussianrandomfields-jl/8733/3 "2018-02-01T21:26:39Z")

</div>

I think [GaussianProcess.jl](https://github.com/STOR-i/GaussianProcesses.jl) is mainly tailored for Gaussian process regression in machine learning. From the docs: “Given a set of observed real-valued points over a space, the Gaussian Process is used to make inference on the values at the remaining points in the space.” The random fields in [GaussianRandomFields.jl](https://github.com/PieterjanRobbe/GaussianRandomFields.jl) are unconditional random fields, so there is no data that needs to be fitted.

Also, as far as I can see from the source code, GaussianProcesses.jl uses a Cholesky factorisation to generate the Gaussian prior. A matrix factorisation approach may become really expensive for lots of data points, especially in higher dimensions. There are other, more efficient, random field generators available in that case.

Maybe these other generation techniques can also be used in the GaussianProcesses framework.
