Learn R Programming

deepspat (version 0.3.1)

RBF_block: Radial Basis Function Warpings

Description

Sets up a composition of radial basis functions (RBFs) for used in a deep compositional spatial model. The function sets up RBFs on a prescribed domain on a grid at a certain resolution. It returns a list containing all the functions in the single-resolution RBF unit. See Value for more details.

Usage

RBF_block(res = 1L, lims = c(-0.5, 0.5), dtype = "float32")

Value

RBF_block returns a list containing a list for each RBF in the block with the following components:

"f"

An encapsulated function that takes an input and evaluates the RBF over some input using TensorFlow

"fR"

Same as f but uses R

"fMC"

Same as f but does it in parallel for several inputs index by the first dimension of the tensor

"r"

The number of basis functions (one for each layer)

"trans"

The transformation applied to the weights before estimation

"fix_weights"

Flag indicating whether the weights are fixed or not (FALSE for RBFs)

"name"

Name of layer

Arguments

res

the resolution

lims

the limits of one side of the square 2D domain on which to set up the RBFs

dtype

data type

Examples

Run this code
# \donttest{
if (reticulate::py_module_available("tensorflow")) {
layer <- RBF_block(res = 1L)
 }
# }

Run the code above in your browser using DataLab