procOPA(shapes)
procOPA()所属R语言包:shapes
Ordinary Procrustes analysis
普通的Procrustes分析
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Ordinary Procustes analysis : the matching of one configuration to another using translation, rotation and (possibly) scale. Reflections can also be included if desired. The function matches configuration B
的普通Procustes分析:一个配置使用平移,旋转和(可能)规模的匹配。如果需要的话,还可以包括思考。功能与配置B
用法----------Usage----------
procOPA(A, B, scale = TRUE, reflect = FALSE)
参数----------Arguments----------
参数:A
k x m matrix (or complex k-vector for 2D data), of k landmarks in m dimensions. This is the reference figure.
KXM矩阵(或复杂的2D数据)的k-矢量,m维的k地标。这是参考数字。
参数:B
k x m matrix (or complex k-vector for 2D data). This is the figure which is to be transformed.
k x的m矩阵(或复杂的2D数据的k-矢量)。这是这是待转化的数字。
参数:scale
logical indicating if scaling is required
逻辑表示如果需要缩放
参数:reflect
logical indicating if reflection is allowed
逻辑反射
值----------Value----------
A list with components:
组件列表:
参数:R
The estimated rotation matrix (may be an orthogonal matrix if reflection is allowed)
估计旋转矩阵(可能是一个正交矩阵如果反射是允许的)
参数:s
The estimated scale matrix
估计规模的矩阵
参数:Ahat
The centred configuration A
该中心的配置A
参数:Bhat
The Procrustes registered configuration B
注册的Procrustes配置B
参数:OSS
The ordinary Procrustes sum of squares, which is $\|Ahat-Bhat\|^2$
普通的Procrustes的平方,这是$ \ | AHAT-铢\ | ^ 2 $
参数:rmsd
rmsd = sqrt(OSS/k) where k is the number of landmarks
RMSD = SQRT(OSS / K),其中k为地标
(作者)----------Author(s)----------
Ian Dryden
参考文献----------References----------
参见----------See Also----------
procGPA,riemdist,tpsgrid
procGPA,riemdist,tpsgrid
实例----------Examples----------
data(digit3.dat)
A<-digit3.dat[,,1]
B<-digit3.dat[,,2]
ans<-procOPA(A,B)
plotshapes(A,B,joinline=1:13)
plotshapes(ans$Ahat,ans$Bhat,joinline=1:13)
#Sooty Mangabey data[黑子白眉数据]
data(sooty.dat)
A<-sooty.dat[,,1] #juvenile[少年]
B<-sooty.dat[,,2] #adult[成人]
par(mfrow=c(1,3))
par(pty="s")
plot(A,xlim=c(-2000,3000),ylim=c(-2000,3000),xlab=" ",ylab=" ")
lines(A[c(1:12,1),])
points(B)
lines(B[c(1:12,1),],lty=2)
title("Juvenile (-------) Adult (- - - -)")
#match B onto A[匹配B到]
out<-procOPA(A,B)
#rotation angle[旋转角度]
print(atan2(out$R[1,2],out$R[1,1])*180/pi)
#scale[规模]
print(out$s)
plot(A,xlim=c(-2000,3000),ylim=c(-2000,3000),xlab=" ",ylab=" ")
lines(A[c(1:12,1),])
points(out$Bhat)
lines(out$Bhat[c(1:12,1),],lty=2)
title("Match adult onto juvenile")
#match A onto B[匹配A到乙]
out<-procOPA(B,A)
#rotation angle[旋转角度]
print(atan2(out$R[1,2],out$R[1,1])*180/pi)
#scale[规模]
print(out$s)
plot(B,xlim=c(-2000,3000),ylim=c(-2000,3000),xlab=" ",ylab=" ")
lines(B[c(1:12,1),],lty=2)
points(out$Bhat)
lines(out$Bhat[c(1:12,1),])
title("Match juvenile onto adult")
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|