View source: R/simulate_data_xy.R
| simulate_obs_exact | R Documentation |
Simulate Geospatial data given (x, y) locations
simulate_obs_exact(
x,
y,
kernel = c("ugsm-s", "ugsmn-s", "bgsfm-s", "bgspm-s", "tgspm-s", "ugsm-st", "bgsm-st"),
theta,
dmetric = c("euclidean", "great_circle")
)
x: |
A vector (x-dim) |
y: |
A vector (y-dim) |
kernel: |
string - kernel ("ugsm-s", "ugsmn-s", "bgsfm-s", "bgspm-s", "tgspm-s", "ugsm-st", "bgsm-st") |
theta: |
list of n parameters (estimated theta) |
dmetric: |
A string - distance metric - "euclidean" or "great_circle" |
a list of three vectors (x, y, z)
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)
x <- rnorm(n, 0, 1) # x measurements of n locations.
y <- rnorm(n, 0, 1) # y measurements of n locations.
exageostat_init(hardware = list(ncores = 2, ngpus = 0, ts = 320, lts = 0, pgrid = 1, qgrid = 1)) ## Initiate exageostat instance
data <- simulate_obs_exact(x, y, kernel, theta, dmetric) ## Generate Z observation vector based on given locations
data
exageostat_finalize() ## Finalize exageostat instance
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.