knnsvdGP | R Documentation |

Fits a K-nearest neighbour SVD-based GP model on a test set
`X0`

, training set `design`

and response matrix `resp`

. The
local neighbourhood sets consist of `nn`

points which are selected
by the Euclidean distance with respect to the test points. See Zhang et
al. (2018) for details.This function supports the
parallelization via both the R packages "parallel" and the OpenMP
library.

knnsvdGP(design,resp, X0=design, nn=20, nsvd = nn, frac = .95, gstart = 0.0001, nstarts = 5,centralize=FALSE, maxit=100, errlog = "", nthread = 1, clutype="PSOCK")

`design` |
An |

`resp` |
An |

`X0` |
An |

`nn` |
The number of neighborhood points selected by the Euclidean distance. the default value is 20. |

`nsvd` |
The number of design points closest to the test points on whose
response matrix to perform the initial singular value
decomposition. The default value is |

`frac` |
The threshold in the cumulative percentage criterion to select the number of SVD bases. The default value is 0.95. |

`gstart` |
The starting number and upper bound for estimating the nugget
parameter. If |

`nstarts` |
The number of starting points used in the numerical maximization of
the posterior density function. The larger |

`centralize` |
If |

`maxit` |
Maximum number of iterations in the numerical optimization algorithm for maximizing the posterior density function. The default value is 100. |

`errlog` |
The path of a log file that records the errors occur in the process of fitting local SVD-based GP models. If an empty string is provided, no log file will be produced. |

`nthread` |
The number of threads (processes) used in parallel execution of this
function. |

`clutype` |
The type of parallization utilized by this function. If |

`pmean` |
An |

`ps2` |
An |

`flags` |
A vector of integers of length |

Ru Zhang heavenmarshal@gmail.com,

C. Devon Lin devon.lin@queensu.ca,

Pritam Ranjan pritamr@iimidr.ac.in

Zhang, R., Lin, C. D. and Ranjan, P. (2018) *Local Gaussian
Process Model for Large-scale Dynamic Computer Experiments*,
Journal of Computational and Graphical Statistics,

DOI:
10.1080/10618600.2018.1473778.

`lasvdGP`

, `svdGP`

.

library("lhs") forretal <- function(x,t,shift=1) { par1 <- x[1]*6+4 par2 <- x[2]*16+4 par3 <- x[3]*6+1 t <- t+shift y <- (par1*t-2)^2*sin(par2*t-par3) } timepoints <- seq(0,1,len=200) design <- lhs::randomLHS(100,3) test <- lhs::randomLHS(20,3) ## evaluate the response matrix on the design matrix resp <- apply(design,1,forretal,timepoints) nn <- 15 gs <- sqrt(.Machine$double.eps) ## knnsvdGP with mutiple (5) start points for GP model estimation ## It use the R package "parallel" for parallelization retknnmsp <- knnsvdGP(design,resp,test,nn,frac=.95,gstart=gs, centralize=TRUE,nstarts=5,nthread=2,clutype="PSOCK") ## knnsvdGP with single start point for GP model estimation ## It does not use parallel computation retknnss <- knnsvdGP(design,resp,test,nn,frac=.95,gstart=gs, centralize=TRUE,nstarts=1,nthread=1)

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.