找回密码
 注册
查看: 385|回复: 0

R语言 SpatialVx包 surrogater2d()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-9-30 12:58:46 | 显示全部楼层 |阅读模式
surrogater2d(SpatialVx)
surrogater2d()所属R语言包:SpatialVx

                                         Create surrogate fields
                                         创建代理领域

                                         译者:生物统计家园网 机器人LoveR

描述----------Description----------

Create surrogate fields that have the same power spectrum and pdf as the original field.
建立替代具有相同的功率谱和PDF的原始字段的字段。


用法----------Usage----------


surrogater2d(Im, frac = 0.95, n = 10, lossfun = "mae", maxiter = 100, zero.down = TRUE, verbose = FALSE, ...)
aaft2d(Im, bigdim = NULL)
fft2d(x, bigdim = NULL, ...)
mae(x1, x2, ...)



参数----------Arguments----------

参数:Im
matrix from which surrogates are to be made.  
矩阵,从代理人进行。


参数:x
matrix to be Fourier transformed.
矩阵的傅立叶变换。


参数:x1,x2
numeric or array of same dimensions giving the two fields over which to calculate the mean aboslute error.
给予超过计算平均aboslute错误的两个字段的相同的尺寸的数值或数组。


参数:frac
single numeric giving the fraction of original amplitudes to maintain.  
单数字的分数,以保持原来的幅度。


参数:n
single numeric giving the number of surrogate fields to create (should be a whole number).  
单数字的替代领域创造(必须为整数)。


参数:lossfun
character naming the loss function to use in computing the error between simulated surrogate fields in the iterative process.  Default is the mean absolute error given by the mae function detailed here.  
字符命名的损失函数来计算模拟替代领域之间的误差在迭代过程中使用。默认情况下是由mae功能详细的平均绝对误差。


参数:maxiter
Maximum number of iterations allowed per surrogate.  
每替代迭代允许的最大数量。


参数:zero.down
logical, does Im contain many zeros, and is otherwise positive?  If so, this sets negative numbers and unusually small numbers to zero.  
逻辑,Im包含了很多的零,否则积极?如果是这样,这是设置负数和异常小的数为零。


参数:bigdim
numeric vector of length two giving the dimensions (larger than dimensions of Im) to compute the FFT's more efficiently (at least potentially).
数值向量,长度为2发出的尺寸(尺寸大于Im)来计算的FFT的更有效的(至少是潜在)。


参数:verbose
logical, should progress information be printed to the screen?  
逻辑的发展,应以信息打印到屏幕上?


参数:...
additional arguments: in the case of fft2d, they are additional arguments to fft (i.e., to use inverse=TRUE), in the case of surrogater2d, they are additional arguments to the loss function given by lossfun, and in the case of mae (default), these are not used.  
额外的参数:fft2d的情况下,他们是额外的参数fft(即,使用逆= TRUE)的情况下,surrogater2d,他们的损失额外的参数lossfun,和的情况下,mae(默认),这些都是不使用的功能。


Details

详细信息----------Details----------

The fft2d function was written to simplify some of the code in surrogater2d and aaft2d.  It is simply a call to the R function fft, but it first resets the dimensions to ones that should maximize the efficiency.  It will also return the dimensions if they are not passed in.
fft2d功能书面简化了一些的代码在surrogater2d和aaft2d的。这是一个简单的调用R函数FFT的,但它首先将复位的尺寸,应最大限度地发挥效率。它也将返回的尺寸,如果他们不传入。

Surrogates are used in non-linear time series analysis to simulate similar time series for hypothesis testing purposes (e.g., Kantz and Schreiber, 1997).  Venugopal et al. (2005) use surrogates of two-dimensional fields as part of their Forecast Quality Index (FQI); which is the intention here.  Theiler et al. (1992) proposed a method known as the amplitude adjusted Fourier transform (AAFT) algorithm, and Schreiber and Schmitz (1996) proposed a modification to this approach in order to obtain surrogates with both the same power spectrum and pdf as the original series.
使用代用项是在非线性时间序列分析,假设检验的目的(例如,Kantz和Schreiber,1997)来模拟类似的时间序列。 Venugopal等人。 (2005)利用代理人的二维领域的一部分,他们的预报质量指数(FQI),这是这里的意图。泰勒等人。 (1992)提出了一种方法被称为的振幅调整后的傅立叶变换(AAFT)算法,和Schreiber和施米茨(1996)提出了这种方法进行修改,以便取得与两者同时为相同的功率谱和pdf作为原始的系列的代理人。

The AAFT method first renders the original data, denoted here as s_n, Gaussian via a rank ordering based on randomly generated Gaussian simulated data.  The resulting series, s_n'=g(s_n), is Gaussian and follows the same measured time evolution as s_n.  Next, phase randomized surrogates are made for s_n', call them s_n".  The rescaling g is then inverted by rank ordering s_n" according to the distribution of the original data, s_n.  This algorithm yields surrogates with the same pdf of amplitudes as s_n by construction, but typically not the same power spectra.  The algorithm proposed by Schreiber and Schmitz (1996) begins with the AAFT, and then iterates through a further algorithm as follows.
AAFT方法首先呈现的原始数据,表示为S_N,高斯随机生成的高斯模拟数据的基础上通过排序。由此带来的一系列S_N“= G(S_N)的,是高斯,并遵循相同的测量时间演化S_N。接下来,相位随机化的替代物S_N“,叫他们S_N”。重新标度,g是然后反转排序S_N“,根据分配的原始数据,S_N。该算法的产量代理相同的PDF的振幅为S_N建设,但通常是不相同的功率谱。施雷伯和Schmitz(1996)提出的算法的AAFT开始,然后再遍历算法如下。

1. Hold a sorted list of s_n and the squared amplitudes of the Fourier transform of s_n, denote them by S2_k.
1。保持的排序列表S_N和振幅平方的傅里叶变换S_N,表示他们的S2_k。

2. Take a random shuffle without replacement of the data, denote as s_n(0).
2。以无需更换的数据,一个随机的洗牌S_N(0)表示为。

3. Take the Fourier transform of s_n(i).
3。以傅立叶变换S_N(I)。

4. Replace the S2_k(i) with S2_k.
4。更换的S2_k(i)与S2_k。

5. Inverse the Fourier transform with the replaced amplitudes.
5。逆傅立叶变换,与被更换的振幅。

6. Rank order the series from 5 in order to assume exactly the values taken by s_n.
6。排名顺序系列5,以承担完全采取S_N。

7. Check the accuracy of 6 using a loss function of some sort, and repeat steps 3 through 6 until a desired level of accuracy is achieved.
7。 6使用某种形式的损失函数检查的准确性,并重复步骤3至6,直到达到所需的精度水平。


值----------Value----------

In the case of surrogater2d: A three dimesnional array of matrices with same dimension as Im, and third dimension giving the n surrogate fields.
在箱子surrogater2d:甲3 dimesnional的进出口,具有相同的尺寸和给予的n代理字段的第三维的矩阵阵列。

In the case of aaft2d: A matrix of the same dimension as Im.
在箱子aaft2d:进出口相同的尺寸的矩阵。

In the case of fft2d: If bigdim is NULL, a list object is returned with components fft and bigdim giving the FFT of x and the larger dimesnions used.  Otherwise, a matrix of dimension x is returned giving the FFT (or inverse FFT) of x.
在箱子fft2d:如果bigdim是NULL,一个列表对象返回与组件的fft和bigdim的给FFT的x的使用较大dimesnions。否则,返回给FFT(或逆FFT)的x尺寸x的矩阵。

In the case of mae: a single numeric giving the mean absolute error between x1 and x2.
在下车的情况下,一个单一的数字给X1和X2之间的平均绝对误差。


(作者)----------Author(s)----------



Eric Gilleland, this code was adapted from matlab code written by Sukanta Basu (2007) available at: http://www.ral.ucar.edu/projects/icp/Software/FeaturesBased/FQI/Perturbed.m




参考文献----------References----------






参见----------See Also----------

fft, locmeasures2d, UIQI, ampstats
fft,locmeasures2d,UIQI,ampstats


实例----------Examples----------


grid<- list( x= seq( 0,5,,100), y= seq(0,5,,100))
obj<-Exp.image.cov( grid=grid, theta=.5, setup=TRUE)
look<- sim.rf( obj)  
look2 <- surrogater2d( look, zero.down=FALSE, n=3)
## Not run: [#不运行:]
par( mfrow=c(2,2))
image.plot( look)
image.plot( look2[,,1])
image.plot( look2[,,2])
image.plot( look2[,,3])

data( pert000)
tmp <- surrogater( pert000, n=10, verbose=TRUE)
boxplot( cbind( c(pert000), apply( tmp, 3, c)))
  
## End(Not run)[#(不执行)]

转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。


注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|小黑屋|生物统计家园 网站价格

GMT+8, 2025-6-11 06:36 , Processed in 0.030377 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表