gp(spectralGP)
gp()所属R语言包:spectralGP
Create a new GP object
创建一个新的GP对象
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Creates a Gaussian process (GP) object based on the spectral basis approximation of a GP on a grid. The advantage of this approach is that GPs can be simulated and sampled much more efficiently than standard GP representations. E.g., GPs can be simulated on fine grids of 256X256 locations, many more locations than can usually be predicted with standard computational approaches. Currently one and two dimensional GPs are supported.
创建一个高斯过程(GP)的基于对象的网格上近似的GP的光谱基础上。这种方法的优点是,全球定位系统,可以模拟和采样效率远远高于标准的GP表示。例如,全球定位系统,可以模拟为256x256的位置,越来越多的位置比标准的计算方法通常可以预测的细网格。目前支持一维和二维的GP。
用法----------Usage----------
gp(gridsize = c(64, 64), specdens = matern.specdens,
specdens.param = c(1, 4),variance.param=1,const.fixed=FALSE)
参数----------Arguments----------
参数:gridsize
Vector (or scalar for one dimension) of number of gridpoints in each direction. Number of gridpoints should be a power of two, and it is recommended that the number be the same for each dimension.
矢量(或标量的一维)在每个方向上的网格点的数量。格点的数量应是二的幂的,它是推荐的数量是相同的为每个维度。
参数:specdens
Function (as a function or text string of the function name) that calculates spectral density of correlation function desired; function should take a vector (scalar) of parameter values. See matern.specdens() for an example.
功能(如函数或文本字符串的函数名),计算所需的相关功能;谱密度函数应该采取的向量参数值(标量)。请参阅matern.specdens()是一个例子。
参数:specdens.param
Vector of parameters to be supplied to the specdens.function function.
要被提供的参数向量的specdens.function函数。
参数:variance.param
Variance parameter used to scale the variances of all the coefficients. Note that this can also be done outside of the GP framework by scaling the predictions as in Wikle (2002).
方差参数,用于扩展的所有系数的差异。请注意的是,这也可以做的GP框架之外通过缩放如在Wikle(2002)的预测。
参数:const.fixed
Logical indicating whether the coefficient of the constant basis function is fixed at zero. Since this coefficient does not have sufficient flexibility under the prior in most situations, it is advisable to fix this coefficient and have a separate mean value/parameter outside of the gp object. However, in simulating realizations, one should not fix this parameter, so as to ensure the correct approximate covariance structure induced by the spectral density and parameter values chosen.
逻辑指示是否恒定的基函数的系数被固定在零。由于这个系数不具有足够的灵活性,它是在大多数情况下,根据现有建议来解决这个系数,有一个单独的平均值/参数的gp对象之外。然而,在模拟实现,不应修复这个参数,以便确保正确的近似协方差结构诱导的谱密度和选择参数值。
Details
详细信息----------Details----------
This function produces an object of class gp. More details on the spectral representation of GPs can be found in Paciorek (2006); see below.
该函数产生一个GP的类的对象。更多细节,可以找到GPS的频谱表示Paciorek(2006年),见下文。
值----------Value----------
An object of class gp. This includes the dimension of the space, the spectral density information, a matrix of coefficients, the Fourier frequencies, and prior variances. <table summary="R valueblock"> <tr valign="top"><td>gridsize</td> <td> Vector (or scalar for one dimension) of number of gridpoints in each direction. </td></tr> <tr valign="top"><td>d</td> <td> Dimension of the space (1 or 2).</td></tr> <tr valign="top"><td>specdens</td> <td> Spectral density function of the correlation function of the GP.</td></tr> <tr valign="top"><td>coeff</td> <td> Matrix of coefficient values (a one-column matrix for one-dimensional processes).</td></tr> <tr valign="top"><td>omega</td> <td> A matrix of Fourier frequency values corresponding the basis functions in expand.grid() format.</td></tr> <tr valign="top"><td>variances</td> <td> A matrix of coefficient variances.</td></tr> </table>
GP的类的对象。这包括的空间的维数,谱密度信息,系数的矩阵,傅立叶频率,和现有的方差。 <table summary="R valueblock"> <tr valign="top"> <TD> gridsize</ TD> <TD>矢量(或一维的标量)在每个方向上的网格点的数目。 </ TD> </ TR> <tr valign="top"> <TD>d </ TD> <TD>尺寸的空间(1或2)。</ TD> </ TR> < TR VALIGN =“顶”> <TD>specdens </ TD> <TD>谱密度函数的相关函数的GP。</ TD> </ TR> <tr valign="top"> < coeff TD> </ TD> <TD>矩阵系数值(一列矩阵的一维过程)。</ TD> </ TR> <tr valign="top"> <TD> omega</ TD> <TD>的傅立叶频率值对应的矩阵的基础功能在expand.grid()格式。</ TD> </ TR> <tr valign="top"> <TD> variances </ TD> <TD>的矩阵系数的差异。</ TD> </ TR> </ TABLE>
(作者)----------Author(s)----------
Christopher Paciorek <a href="mailto:paciorek@alumni.cmu.edu">paciorek@alumni.cmu.edu</a>
参考文献----------References----------
<h3>See Also</h3> <code>simulate.gp</code>, <code>plot.gp</code>, <code>propose.coeff.gp</code>, <code>calc.variances.gp</code>,
实例----------Examples----------
library(spectralGP)
gp1=gp(128,matern.specdens,c(1,4))
gp2=gp(c(64,64),matern.specdens,c(1,4))
simulate(gp1)
simulate(gp2)
plot(gp1)
plot(gp2)
n=100
locs=cbind(runif(n,0.2,1.2),runif(n,-0.2,1.4))
locs.predict=cbind(runif(n,-0.4,0.8),runif(n,-0.1,1.7))
scaled.locs=xy2unit(locs,rbind(locs,locs.predict))
scaled.locs.predict=xy2unit(locs.predict,rbind(locs,locs.predict))
train.map=new.mapping(gp2,scaled.locs)
predict.map=new.mapping(gp2,scaled.locs.predict)
vals.train=predict(gp2,mapping=train.map)
vals.predict=predict(gp2,mapping=predict.map)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|