Learn R Programming

deepspat (version 0.3.1)

deepspat_MSP: Deep compositional spatial model for max-stable processes

Description

Constructs an extended deep compositional spatial model that supports different estimation methods ("MPL", "MRPL", or "WLS") and spatial dependence families (stationary or non-stationary). This function extends the basic deepspat model by incorporating additional dependence modeling and pre-training steps for the warping layers.

Usage

deepspat_MSP(
  f,
  data,
  layers = NULL,
  method = c("MPL", "MRPL", "WLS"),
  par_init = initvars(),
  learn_rates = init_learn_rates(),
  family = c("power_stat", "power_nonstat"),
  dtype = "float64",
  nsteps = 100L,
  nsteps_pre = 100L,
  edm_emp = NULL,
  p = c(0, 1),
  pen_coef = 0,
  show = TRUE,
  ...
)

Value

deepspat_MSP returns an object of class deepspat_MSP which is a list containing the following components:

layers

The list of warping layers used in the model.

Cost

The final cost value after training (e.g., negative log-likelihood, least squares, or gradient score).

transeta_tf

TensorFlow objects for the transformed dependence parameters in the warping layers.

eta_tf

TensorFlow objects for the warped dependence parameters.

a_tf

TensorFlow object for the parameters of the LFT layers (if applicable).

logphi_tf

TensorFlow variable representing the logarithm of the spatial range parameter.

logitkappa_tf

TensorFlow variable representing the logit-transformed degrees of freedom.

scalings

A list of scaling limits (minima and maxima) for the input and warped spatial coordinates.

s_tf

TensorFlow object for the scaled spatial coordinates.

z_tf

TensorFlow object for the observed response values.

swarped_tf

List of TensorFlow objects representing the warped spatial coordinates at each layer.

swarped

Matrix of final warped spatial coordinates.

method

The estimation method used ("MPL", "MRPL", or "WLS").

family

The spatial dependence family ("power_stat" or "power_nonstat").

dtype

The data type used in TensorFlow computations.

nlayers

Number of warping layers (for non-stationary models).

f

The model formula.

data

The data frame used for model fitting.

ndata

Number of observations in data.

negcost

Vector of cost values recorded during training.

pairs_tf

TensorFlow variable representing the spatial location pairs (and, for MRPL, the replicate indices) used in the pairwise / randomized pairwise likelihood or WLS objective..

p

Input size of pair subset for pairwise likelihood, or the parameter of Bernoulli r.v. for randomized pairwise likelihood.

time

Elapsed time for model fitting.

Arguments

f

A formula identifying the dependent variable(s) and the spatial inputs. Use get_depvars_multivar3 to extract the dependent variable names.

data

A data frame containing the required data.

layers

A list containing the warping layers; required for non-stationary models (i.e., when family = "power_nonstat").

method

A character string specifying the estimation method. Must be one of "MPL", "MRPL", or "WLS" for max-stable Brown-Resnick processes

par_init

A list of initial parameter values. Call the function initvars() to see the structure of the list.

learn_rates

A list of learning rates for the various quantities in the model. Call the function init_learn_rates() to see the structure of the list.

family

A character string specifying the spatial dependence model. Use "power_nonstat" for non-stationary models and "sta" for stationary models.

dtype

A character string indicating the data type for TensorFlow computations ("float32" or "float64"). Default is "float32"

nsteps

An integer specifying the number of training steps for dependence parameter learning.

nsteps_pre

An integer specifying the number of pre-training steps for warping layer parameters.

edm_emp

For the WLS method, a numeric vector or matrix providing an empirical extremal coefficients.

p

For pairwise likelihood based methods, p is used to specify the size of pair subset for pairwise likelihood, or the probability parameter of Bernoulli r.v. for randomized pairwise likelihood.

pen_coef

A penalty parameter for weights of SR-RBF(2) to relieve overfitting.

show

Logical; if TRUE progress information is printed during training.

...

Currently unused.