gmm2d(SpatialVx)
gmm2d()所属R语言包:SpatialVx
2-d Gaussian Mixture Models Verification
2-D高斯混合模型的验证
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Use 2-d Gaussian Mixture Models (GMM) to assess forecast performance.
使用2-D高斯混合模型(GMM),以评估预测性能。
用法----------Usage----------
gmm2d(X, Y, K = 3, gamma = 1, threshold = NULL, initFUN = "initGMM", verbose = FALSE, ...)
## S3 method for class 'gmm2d'
plot(x, ...)
## S3 method for class 'gmm2d'
predict(object, ...)
## S3 method for class 'gmm2d'
summary(object, ...)
参数----------Arguments----------
参数:X,Y
m X n numeric matrices giving the verification and forecast fields, resp.
M×N的数字矩阵提供的验证和预报场分别。
参数:x,object
output from gmm2d.
输出从gmm2d。
参数:K
single numeric giving the number of mixture components to use.
单个数字给予混合物组分的数量使用。
参数:gamma
Value of the gamma parameter from Eq (11) of Lakshmanan and Kain (2010). This affects the number of times a location is repeated.
Lakshmanan提供和Kain(2010)由式(11)的伽马参数的值。这会影响重复的位置的数目的次数。
参数:threshold
numeric giving a threshold over which (and including) the GMM is to be fit (zero-valued grid points are not included in the estimation here for speed). If NULL, no thresholding is applied.
数字给予的GMM(并包括)的阈值以上是合适的(零值的网格点,不包括在这里用于速度的估计)。如果为NULL,没有阈值。
参数:initFUN
character naming a function to provide initial estimates for the GMM. Must take an m X n matrix as input, and return a dataframe a component called ind that is a vector indicating the order of the rows for which the first K will be used, a third column giving the x-coordinates of the initial estimate of the mean for the x direction, fourth column giving the initial estimate for the mean of the y-direction, and fifth and sixth columns giving initial estimates for the standard deviations of the x- and y-directions. The default identifies all connected components using the disjointer function, then uses their centroids as the initial estimates of the means, and their axes as initial estimates for the standard deviations. The ind component gives the order of the object areas from largest to smallest so that the K largest objects are used to provide initial estimates. Note that this differs from the initial estimates in Lakshmanan and Kain (2010) where they break the field into different areas first.
字符命名为GMM的功能提供初步估计。必须采取一个M×N矩阵作为输入,并返回一个数据框一种成分叫做ind行的第一K将使用的顺序,第三列给出的是一个向量, x坐标的x方向的平均值的初始估计,第四列给出的初始估计为y方向上的平均值,以及第五和第六列给出的标准偏差的x-和y-方向的初始估计。 disjointer使用函数,默认识别所有连接的组件,然后使用其质心的手段,初步估计其轴初步估计的标准差。 ind组件提供的对象区域的顺序,从最大到最小,这样的K最大的对象是用来提供初步估计。请注意,这不同于Lakshmanan提供和Kain(2010)初步估计,他们打破了不同领域的第一个领域。
参数:verbose
logical, should progress information be printed to the screen?
逻辑的发展,应以信息打印到屏幕上?
参数:...
In the case of gmm2d: optional arguments to initFUN. In the case of plot: not used. In the case of predict: N X 2 matrix of grid point locations on which to predict the probability from the 2-d GMM model. In the case of summary: this can include the arguments: 'silent', logical stating whether to print summaries to the screen (FALSE) or not (TURE), 'e1', 'e2', ..., 'e5', giving alternative weights in calculating the overall error (Wq 15 in Lakshmanan and Kain, 2010, but see details section below).
的情况下,gmm2d:可选参数initFUN。在plot:没有使用的情况下。在predict:NX 2矩阵的网格点的位置,在其上从2维GMM模型预测的概率的情况下。在的情况下,summary:这可能包括的参数:沉默,逻辑陈述是否打印摘要在屏幕上(FALSE)或没有(TURE),,“E1”,“E2”,..., “E5”,让其他权重计算总误差(Lakshmanan提供和Kain 2010年15 WQ,但详情请参阅下面一节)。
Details
详细信息----------Details----------
These functions carry out the spatial verification approach described in Lakshmanan and Kain (2010), which fits a 2-d Gaussian Mixture Model (GMM) to the locations for each field in the verification set, and makes comparisons using the estimated parameters. In fitting the GMM's, first an initial estimate is provided by using the initFUN argument, which is a function. The default function is relatively fast (it might seem slow, but for what it does, it's very fast!), but is typically the slowest part of the process. Although the EM algorithm is a fairly computationally intensive procedure, acceleration algorithms are employed (via the turboem function of the turboEM package) so that once initial estimates are found, the procedure is very fast.
这些功能进行Lakshmanan提供和Kain(2010年)中描述的空间验证方法,适合的2-D高斯混合模型(GMM)的验证组中的每个字段的位置,并使用参数的估计进行比较。在装修GMM的,先提供一个初步的估算由,使用initFUN的说法,这是一个函数。默认功能是比较快的(它可能看起来很慢,但它做什么,它的速度非常快!),但通常是最慢的部分过程。虽然EM算法是一个相当密集计算的过程中,加速算法雇用(通过功能的turboEM包turboem),因此,一旦初始估计被发现,该过程是非常快的。
Because the fit is to the locations only, Lakshmanan and Kain (2010) suggest two ways to incorporate intensity information. The first is to repeat points with higher intensities, and the second is to multiply the results by the total intensities over the fields. The points are repeated M times according to the formula (Eq 11 in Lakshmanan and Kain, 2010):
因为适合的地点,Lakshmanan提供和Kain(2010)提出了两种方法结合强度信息。首先是要重复点具有较高的强度,和第二相乘的结果,由在字段的总强度。点重复M次,根据式(式11 Lakshmanan提供和Kain,2010):
M = 1 + gamma * round( CFD(I_xy)/frequency(I_MODE)),
M = 1 +γ* ROUND(的CFD(I_xy)/频率(I_MODE)),
where CFD is the cumulative *frequency* distribution (here estimated from the histogram using the 'hist' function), I_xy is intensity at grid point (x,y), I_MODE is the mode of intensity values, and gamma is a user-supplied parameter controlling how much to repeat points where higher numbers will result in larger repetitions of high intensity values.
其中CFD是累积*频率*分布(在这里使用的“历史”功能从直方图估计),I_xy是在网格点(x,y)的强度,I_MODE是模式的强度值,和γ是用户提供的参数控制多少重复点较高的数字会导致重复的高强度值较大。
The function 'gmm2d' fits the 2-d GMM to both fields, 'plot.gmm2d' first uses 'predict.gmm2d' to obtain probabilities for each grid point, and then makes a plot similar to those in Lakshmanan and Kain (2010) Fig.'s 3, 4 and 5, but giving the probabilities instead of the probabilities times A. Note that 'predict.gmm2d' can be very slow to compute so that plot.gmm2d can also be very slow. Less effort was put into speeding these functions up because they are not necessary for obtaining results via the parameters. However, they can give the user an idea of how good the fit is.
的功能“gmm2d”适合的2-D GMM这两个领域,首先使用plot.gmm2d的“predict.gmm2d获得每个网格点的概率,然后使类似的图Lakshmanan提供和Kain(2010)图的第3,4和5,但给出的概率的概率,而不是乘以A.请注意,,predict.gmm2d可以很慢,这样来计算,也可以是非常慢的plot.gmm2d。减精力被投入到加快这些功能,因为他们获得通过参数的结果是没有必要的。然而,他们可以给用户一个想法有多好,适合。
The 2-d GMM is given by
2维高斯混合模型由下式给出
G(x,y) = A*sum(lambda*f(x,y))
G(X,Y)= A *总和(λ* F(X,Y))
where lambda and f(x,y) are numeric vectors of length K, lambda components describe the mixing, and f(x,y) is the bivariate normal distribution with mean (mu.x, mu.y) and covariance function. 'A' is the total sum of intensities over the field.
其中λ和F(X,Y)的数字向量的长度为K,λ组件描述的混合,F(X,Y)是二元正态分布的意思(mu.x,mu.y)和协方差函数。 A是在该字段的强度的总和。
Comparisons between forecast and observed fields are carried out finally by the summary method function. In particular, the translation error
比较的预测和观察到的领域进行了最后的总结方法的功能。具体地,翻译错误
e.tr = sqrt((mu.xf - mu.xo)^2 + (mu.yf - mu.yo)^2),
e.tr = SQRT((mu.xf - mu.xo),(mu.yf - mu.yo)^ 2)^ 2 +,
where f means forecast and o verification fields, resp., and mu .x is the mean in the x- direction, and mu.y in the y- direction. The rotation error is given by
其中f是指预测和o的检验场,分别,和mu。x是在x-方向上的平均值,并在y方向mu.y。由下式给出的旋转误差
e.rot = (180/pi)*acos(theta),
e.rot =(180/PI)* ACOS(θ),
where theta is the dot product between the first eigenvectors of the covariance matrices for the verification and forecast fields. The scaling error is given by
其中,θ为第一的验证和预报场的协方差矩阵的特征向量之间的点积。的定标误差由下式给出
e.sc = Af*lambda.f/Ao*lambda.o,
e.sc = AF * lambda.f / AO * lambda.o,
where lambda is the mixture component and Af/Ao is the forecast/observed total intensity.
其中lambda是混合成分和自动对焦/自动的敖预测/观测到的总强度。
The overall error (Eq 15 of Lakshmanana and Kain, 2010) is given by
整体错误的Lakshmanana和Kain,2010(15式)
e.overall = e1 * min(e.tr/e2, 1) + e3*min(e.rot,180 - e.rot)/e4 + e5*(max(e.sc,1/e.sc)-1),
e.overall = E1分钟(e.tr/e2,1)+ E3 *分(e.rot,180 - e.rot的)/ E4 + E5 *(最大(e.sc,1/e.sc) - 1),
where e1 to e5 can be supplied by the user, but the defaults are those given by Lakshmanan and Kain (2010). Namely, e1 = 0.3, e2 = 100, e3=0.2, e4 = 90, and e5=0.5.
E1至E5的,可以由用户提供的,但是默认是Lakshmanan提供和Kain(2010)。即中,e1和e2 = 0.3 = 100,e3的= 0.2,e4的= 90,和e5 = 0.5。
值----------Value----------
For gmm2d, a list object of class "gmm2d" is returned with components:
对于gmm2d,返回一个列表对象的类“gmm2d”的组件:
参数:fitX,fitY
list objects returned by the 'turboem' function from the turboEM package that describe the EM estimates of the 2-d GMM parameters for the verification and forecast fields, resp.
由“turboem”功能从该turboEM的包返回的列表对象,描述了EM估计的2-D GMM的参数进行验证和预报场分别。
参数:initX,initY
numeric vectors giving the initial estimates used in the EM algorithm for the verification and forecast fields, resp. The first 2*K values are the initial mean estiamtes for the x- and y- directions, resp. The next 4*K values are the initial estiamtes of the covariances (note that the cross-covariance terms are zero regardless of initialization function employed (maybe this will be improved in the future). The final K values are the initial estimates for lambda.
数字向量给人的最初估计的EM算法进行验证和预报场分别。第一个2 * K值的x-和y-方向,分别的的初始平均estiamtes为。在接下来的4 * K值的协方差(注意,互协方差项为零无论采用初始化函数(也许这将是改善在未来)的初始estiamtes最后的K值是为lambda的初始估计。
参数:sX,sY
N X 2 matrix giving the repeated coordinates calculated per M as described in the details section for the verification and forecast fields, resp.
NX 2的矩阵为反复坐标计算出的价格为每所描述的细节部分进行验证和预报场分别。
参数:k
single numeric giving the value of K
单数字的K值
参数:Ax,Ay
single numerics giving the value of A (the total sum of intensities over the field) for the verifiaction and forecast fields, resp.
单数字A(满场强度的总和)的verifiaction和预报场,分别赠送价值。
For 'plot.gmm2d' no value is returned. A plot is created.
对于plot.gmm2d“不返回任何值。有一个图是创建。
For 'predict.gmm2d', a list is returned with components:
对于predict.gmm2d,一个列表与组件返回:
参数:predX,predY
numeric vectors giving the GMM predicted values for the verification and forecast fields, resp.
给GMM的数字向量的预测值进行验证和预报场分别。
For 'summary.gmm2d', a list is returned invisibly (if silent is FALSE, information is printed to the screen) with components:
一个列表对于“summary.gmm2d,返回不可见的组件(如果沉默是FALSE,信息打印到屏幕上):
参数:meanX,meanY
Estimated mean vectors for each GMM component for the verification and forecast fields, resp.
估计平均向量进行验证和预报场,分别为每个GMM组成部分。
参数:covX,covY
Estimated covariances for each GMM component for the verification and forecast fields, resp.
估计协方差的验证和预报场,分别为每个GMM组成部分。
参数:lambdasX,lambdasY
Estimated mixture components for each GMM component for the verification and forecast fields, resp.
估计混合成分的验证和预报场,分别为每个GMM组成部分。
参数:e.tr,e.rot,e.sc,e.overall
K X K matrices giving the errors between each GMM component in the verification field (rows) to each GMM component in the forecast field (columns). The errors are: translation (e.tr), rotation (e.rot), scaling (e.sc), and overall (e.overall).
KXK矩阵给每个GMM组成部分之间的误差在验证字段(行)的预测字段(列)每个GMM组成部分。错误是:,旋转(e.rot)翻译(e.tr),缩放(e.sc)和整体(e.overall)。
(作者)----------Author(s)----------
Eric Gilleland
参考文献----------References----------
参见----------See Also----------
turboem, disjointer, connected
turboem,disjointer,connected
实例----------Examples----------
grid<- list( x= seq( 0,5,,20), y= seq(0,5,,20))
obj<-Exp.image.cov( grid=grid, theta=.5, setup=TRUE)
look<- sim.rf( obj)
look[ look < 0] <- 0
look <- zapsmall( look)
look2 <- sim.rf( obj)
look2[ look2 < 0] <- 0
look2 <- zapsmall( look2)
u <- min(quantile(c(look[look>0]),probs=0.75),quantile(c(look2[look>0]),probs=0.75))
hold <- gmm2d(look, look2, threshold=u, verbose=TRUE)
summary(hold)
plot(hold)
## Not run: [#不运行:]
data(pert000)
data(pert004)
look <- gmm2d(pert000, pert004, threshold=5, verbose=TRUE)
plot(look) # This will take a long time![这将需要很长的时间!]
summary(look)
## End(Not run)[#(不执行)]
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|