Learn R Programming

tgp (version 1.1-6)

exp2d.rand: Randomly subsampled 2-d Exponential Data

Description

A Random subsample of data(exp2d)

Usage

exp2d.rand(n1 = 50, n2 = 30)

Arguments

n1
Number of samples from the first, interesting, quadrant
n2
Number of samples from the other three, uninteresting, quadrants

Value

  • Output is a list with entries:
  • X2-d data.frame with n1 + n2 input locations
  • ZNumeric vector describing the responses (with noise) at the X input locations
  • ZtrueNumeric vector describing the true responses (without noise) at the X input locations
  • XX2-d data.frame containing the remaining 441 - (n1 + n2) input locations
  • ZZNumeric vector describing the responses (with noise) at the XX predictive locations
  • ZZtrueNumeric vector describing the responses (without noise) at the XX predictive locations

Details

Data is subsampled without replacement from data(exp2d). Of the n1 + n2 >= 441 input/response pairs X,Z, n1 are taken from the first quadrant, i.e., where the response is interesting, and the remaining n1 are taken from the other three quadrant. The remaining 441 - (n1 + n2) are treated as predictive locations

References

Gramacy, R. B., Lee, H. K. H., & Macready, W. (2004). Parameter space exploration with Gaussian process trees. ICML (pp. 353--360). Omnipress & ACM Digital Library.

Gramacy, R. B. & Lee, H. K. H. (2005). Gaussian Processes and Limiting Linear Models. available as UCSC Technical Report ams2005-17

http://www.ams.ucsc.edu/~rbgramacy/tgp.php

See Also

exp2d, tgp, bgpllm, btlm, blm, bgp, btgpllm, bgp

Examples

Run this code
# random data
ed <- exp2d.rand()

# higher span = 0.5 required because the data is sparse
# and was generated randomly
ed.g <- interp.loess(ed$X[,1], ed$X[,2], ed$Z, span=0.5)

# perspective plot, and plot of the input (X) locations
par(mfrow=c(1,2), bty="n")
persp(ed.g, main="loess surface", theta=-30, phi=20,
      xlab="X[,1]", ylab="X[,2]", zlab="Z")
plot(ed$X, main="Randomly Subsampled Inputs")

Run the code above in your browser using DataLab