GP.generate.grids {BayesGPfit} | R Documentation |
Create spatial grids.
GP.generate.grids(
d = 1L,
num_grids = 50L,
grids_lim = c(-1, 1),
random = FALSE
)
d |
An integer number for the dimension of the space. The default value is 1. |
num_grids |
An integer number for the number of grids in each dimension. The default value is 50. |
grids_lim |
A vector of two real numbers for the range of the grids in each dimension. The default value is c(-1,1). |
random |
A logical value indicating whether each dimension of the grids is generated from a uniform distribution or fixed as equally-spaced. |
A matrix with d columns and num_grids^d rows.
Jian Kang <jiankang@umich.edu>
x = GP.generate.grids(d=2L)
require(lattice)
y = sin(abs(x[,1]+x[,2]))
levelplot(y~x[,1]+x[,2])