new.mapping(spectralGP)
new.mapping()所属R语言包:spectralGP
Map arbitrary locations to gridpoints of spectral GP object
图的任意位置,以网格点的谱GP对象
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Finds the nearest gridpoint in a spectral GP representation for each supplied location based on Euclidean distance.
寻找中的光谱GP表示每一个提供的基于位置的欧氏距离最近的格点。
用法----------Usage----------
new.mapping(object, locations)
参数----------Arguments----------
参数:object
A GP object, created by gp.
一个GP对象,创建的gp。
参数:locations
A two-column matrix-like object (vector for one-dimensional data) of locations of interest, for which the first column is the first coordinate and the second column the second coordinate. Locations should lie in (0,1)^d, as the process representation is on a grid on (0,1)^d.
甲两列的矩阵状的感兴趣的位置的对象(矢量为一维数据),其中的第一列的第一坐标和所述第二列的第二坐标。位置应位于(0,1)^d的过程表示在网格(0,1)^d。
值----------Value----------
A vector for which each element is the index of the gridpoint nearest the location. The indices run from 1 to (k/2)^d where k the number of gridpoints in each direction (assuming there are an equal number in each direction). The indices run along the first dimension from the lower right corner of the space, e.g., 13 14 15 16 9 10 11 12 5 6 7 8 1 2 3 4
一种向量,其中每个元素是格点最接近的位置的索引。该指数从1到(k/2)^d其中k在每个方向上的网格点的数量(假设有同样数目的每个方向)。该指数从右下角的空间,例如,13 14 15 16 9 10 11 12 5 6 7 8 1 2 3 4沿第一维度运行
(作者)----------Author(s)----------
Christopher Paciorek <a href="mailto:paciorek@alumni.cmu.edu">paciorek@alumni.cmu.edu</a>
参考文献----------References----------
<h3>See Also</h3>
实例----------Examples----------
library(spectralGP)
loc1=runif(100)
loc2=cbind(runif(100),runif(100,0,1))
gp1=gp(128,matern.specdens,c(1,4))
gp2=gp(c(64,64),matern.specdens,c(1,4))
map1=new.mapping(gp1,loc1)
map2=new.mapping(gp2,loc2)
simulate(gp1)
simulate(gp2)
vals1=predict(gp1,mapping=map1)
vals2=predict(gp2,mapping=map2)
plot(gp1)
points(loc1,vals1)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|