GP.generate.grids: Create spatial grids.

View source: R/fastGPfit.R

GP.generate.gridsR Documentation

Create spatial grids.

Description

Create spatial grids.

Usage

GP.generate.grids(
  d = 1L,
  num_grids = 50L,
  grids_lim = c(-1, 1),
  random = FALSE
)

Arguments

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.

Value

A matrix with d columns and num_grids^d rows.

Author(s)

Jian Kang <jiankang@umich.edu>

Examples

x = GP.generate.grids(d=2L)
require(lattice)
y = sin(abs(x[,1]+x[,2]))
levelplot(y~x[,1]+x[,2])

BayesGPfit documentation built on Aug. 6, 2022, 5:06 p.m.