View source: R/simulate_data.R
simulate_data_exact | R Documentation |
Simulate Geospatial data (x, y, z)
simulate_data_exact(
kernel = c("ugsm-s", "ugsmn-s", "bgsfm-s", "bgspm-s", "tgspm-s", "ugsm-st", "bgsm-st"),
theta,
dmetric = c("euclidean", "great_circle"),
n,
seed = 0
)
dmetric |
A string - distance metric - "euclidean" or "great_circle" |
n |
A number - data size |
seed |
A number - seed of random generation |
kernel: |
string - kernel ("ugsm-s", "ugsmn-s", "bgsfm-s", "bgspm-s", "tgspm-s", "ugsm-st", "bgsm-st") |
theta: |
list of n parameters (estimated theta) |
a list of of three vectors (x, y, z)
seed <- 0 ## Initial seed to generate XY locs.
kernel <- "ugsm-s"
theta <- c(1, 0.1, 0.5) #Params vector.
dmetric <- "euclidean" ## "euclidean" or "great_circle" distance.
n <- 1600 ## The number of locations (n must be a square number, n=m^2).
exageostat_init(hardware = list(ncores = 2, ngpus = 0, ts = 320, lts = 0, pgrid = 1, qgrid = 1)) ## Initiate exageostat instance
data <- simulate_data_exact(kernel, theta, dmetric, n, seed) ## Generate Z observation vector
data
exageostat_finalize() ## Finalize exageostat instance
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.