Learn R Programming

Deep Compositional Spatial Models

Note: This version uses TensorFlow v2 -- for the original TensorFlow v1 version please download Release 0.2.0

Deep compositional spatial models are standard spatial covariance models coupled with an injective warping function of the spatial domain. The warping function is constructed through a composition of multiple elemental injective functions in a deep-learning framework. The package implements two cases for the univariate setting; first, when these warping functions are known up to some weights that need to be estimated, and, second, when the weights in each layer are random. In the multivariate setting only the former case is available. Estimation and inference is done using TensorFlow, which makes use of graphics processing units.

Resources

A number of manuscripts explain the theory and methodology behind the deep compositional spatial models in details, see here for the univariate setting, here for the multivariate setting, here for the spatio-temporal setting, and here for the extremes.

An informal blog post summarising the manuscript concerning the univariate setting is available here.

Installation Instructions

This is an R package. Please install devtools and then install this package by typing

library("devtools")
install_github("andrewzm/deepspat")

in an R console.

Reproducible Code

Code using this package for reproducing the results shown in the manuscript describing the univariate setting is available in the supplemental material of our first article. Code for the results shown in manuscript describing the multivariate setting is available here.

Please note that for this version of deepspat you will require at least TensorFlow 2.15.

Copy Link

Version

Install

install.packages('deepspat')

Monthly Downloads

209

Version

0.3.1

License

Apache License 2.0

Issues

Pull Requests

Stars

Forks

Maintainer

Quan Vu

Last Published

November 25th, 2025

Functions in deepspat (0.3.1)

predict.deepspat_trivar_GP

Deep trivariate compositional spatial model
sim_data

Generate simulation data for testing
summary.deepspat_MSP

Deep compositional spatial model for max-stable processes
summary.deepspat_rPP

Deep compositional spatial model for r-Pareto processes
predict.deepspat_nn_ST_GP

Deep compositional spatio-temporal model (with nearest neighbors)
predict.deepspat_nn_GP

Deep compositional spatial model (with nearest neighbors)
deepspat_rPP

Deep compositional spatial model for r-Pareto processes
set_deepspat_seed

Set TensorFlow seed
RBF_block

Radial Basis Function Warpings
LFT

LFT (Möbius transformation)
deepspat_MSP

Deep compositional spatial model for max-stable processes
bisquares1D

Bisquare functions on a 1D domain
AWU

Axial Warping Unit
deepspat

Deep compositional spatial models
bisquares2D

Bisquare functions on a 2D domain
deepspat_GP

Deep compositional spatial model for Gaussian processes
AFF_1D

Affine transformation on a 1D domain
AFF_2D

Affine transformation on a 2D domain
init_learn_rates

Initialise learning rates
deepspat_trivar_GP

Deep trivariate compositional spatial model for Gaussian processes
predict.deepspat

Deep compositional spatial model
deepspat_bivar_GP

Deep bivariate compositional spatial model for Gaussian processes
predict.deepspat_bivar_GP

Deep bivariate compositional spatial model
deepspat_nn_ST_GP

Deep compositional spatio-temporal model (with nearest neighbors) for Gaussian processes
deepspat_nn_GP

Deep compositional spatial model (with nearest neighbors) for Gaussian processes
predict.deepspat_GP

Deep compositional spatial model
initvars

Initialise weights and parameters