PsiJmat(wavethresh)
PsiJmat()所属R语言包:wavethresh
Compute discrete autocorrelation wavelets but return result in matrix form.
计算离散自相关小波,但以矩阵形式返回结果。
译者:生物统计家园网 机器人LoveR
描述----------Description----------
This function computes discrete autocorrelation wavelets using the PsiJ function but it returns the results as a matrix rather than a list object.
自相关函数计算离散小波使用PsiJ功能的,但它返回的结果作为一个矩阵,而不是一个列表对象。
用法----------Usage----------
PsiJmat(J, filter.number = 10, family = "DaubLeAsymm", OPLENGTH=1e+05)
参数----------Arguments----------
参数:J
Discrete autocorrelation wavelets will be computed for scales -1 up to scale J. This number should be a negative integer.
将计算离散自相关小波尺度-1起来,规模J.这个数字应该是一个负整数。
参数:filter.number
The index of the wavelet used to compute the discrete autocorrelation wavelets.
小波的索引用于计算离散自相关小波。
参数:family
The family of wavelet used to compute the discrete autocorrelation wavelets.
的家庭使用的小波来计算离散自相关的小波。
参数:OPLENGTH
This integer variable defines some workspace of length OPLENGTH. The code uses this workspace. If the workspace is not long enough then the routine will stop and probably tell you what OPLENGTH should be set to.
这个整数变量定义的长度OPLENGTH一些工作区。该代码使用此工作区。如果工作区是不是足够长的时间,那么程序将停止,并可能会告诉你什么OPLENGTH应设置为。
Details
详细信息----------Details----------
The discrete autocorrelation wavelet values are computed using the PsiJ function. This function merely organises them into a matrix form.
离散自相关小波PsiJ使用函数值计算的。此功能只是它们组织到以矩阵形式。
值----------Value----------
A matrix containing -J rows and a number of columns less than OPLENGTH. Each row contains the values of the discrete autocorrelation wavelet for a different scale. Row one contains the scale -1 coefficients, row two contains the scale -2, and so on.
一个矩阵包含-J行和一个数列小于OPLENGTH。每行包含的值不同规模的离散自相关小波。行一个包含规模-1系数,行2包含刻度-2,依此类推。
The number of columns is an odd number. The middle position of each row is the value of the discrete autocorrelation wavelet at zero — this is always 1. The discrete autocorrelation wavelet is symmetric about this point.
的列的数量是奇数。每一行的中间位置的值为零的离散自相关小波 - 这始终是1。关于这一点的离散自相关小波是对称的。
Important Apart from the central element none of the other columns line up in this way. This could be improved upon.
重要的核心要素没有其他列排队这种方式。这可以改进。
RELEASE----------RELEASE----------
Version 3.9 Copyright Guy Nason 1998
版本3.9版权所有1998年盖利晨
(作者)----------Author(s)----------
G P Nason
参考文献----------References----------
参见----------See Also----------
PsiJ
PsiJ
实例----------Examples----------
#[]
# As a simple first examples we shall compute the matrix containing[作为一个简单的例子,我们计算矩阵]
# the discrete autocorrelation wavelets up to scale 3.[离散自相关小波规模3。]
#[]
PsiJmat(-3, filter.number=1, family="DaubExPhase")
#Computing PsiJ[计算PsiJ]
#Took 0.25 seconds[采取0.25秒]
# [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [[1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11]]
#[1,] 0.000 0.00 0.000 0.0 0.000 0.00 -0.500 1 -0.500 0.00 0.000[[1] 0.000 0.00 0.000 0.0 0.000 0.00 -0.500 -0.500 0.00 0.000]
#[2,] 0.000 0.00 0.000 0.0 -0.250 -0.50 0.250 1 0.250 -0.50 -0.250[[2] 0.000 0.00 0.000 0.0 -0.250 -0.50 0.250 0.250 -0.50 -0.250]
#[3,] -0.125 -0.25 -0.375 -0.5 -0.125 0.25 0.625 1 0.625 0.25 -0.125[[3] -0.125 -0.25 -0.375 -0.5 -0.125 0.25 0.625 1 0.625 0.25 -0.125]
# [,12] [,13] [,14] [,15] [[12] [13] [14] [15]]
#[1,] 0.0 0.000 0.00 0.000[[1] 0.0 0.000 0.00 0.000]
#[2,] 0.0 0.000 0.00 0.000[[2] 0.0 0.000 0.00 0.000]
#[3,] -0.5 -0.375 -0.25 -0.125[[3] -0.5 -0.375 -0.25 -0.125]
#[]
# Note that this contains 3 rows (since J=-3).[请注意,此包含3行(自J = -3)。]
# Each row contains the same discrete autocorrelation wavelet at different[每行包含相同的离散自相关小波在不同的]
# scales and hence different resolutions.[尺度,因此不同的决议。]
# Compare to the output given by PsiJ for the[比较的输出给出由PsiJ为]
# equivalent wavelet and scales.[相当于小波和尺度。]
# Note also that apart from column 8 which contains 1 (the value of the[还请注意,除了从塔8,其中包含1(的值]
# ac wavelet at zero) none of the other columns line up. E.g. the value of[零交流小波)没有其他列线。例如的值]
# this wavelet at 1/2 is -0.5: this appears in columns 9, 10 and 12[在1/2这种小波是-0.5:这列中的第9,第10和12出现]
# we could have written it differently so that they should line up.[我们可以编写不同,因此,他们应该排队。]
# I might do this in the future. [在未来,我可能做到这一点。]
#[]
#[]
# Let's compute the matrix containing the discrete autocorrelation[让我们计算包含的离散自相关矩阵]
# wavelets up to scale 6 using Daubechies N=10 least-asymmetric[小波规模利用Daubechies N = 10至少不对称]
# wavelets.[小波。]
#[]
P6mat <- PsiJmat(-6, filter.number=10, family="DaubLeAsymm")
#[]
# What is the dimension of this matrix?[这个矩阵是什么尺寸?]
#[]
dim(P6mat)
#[1] 6 2395[[1] 6 2395]
#[]
# Hmmm. Pretty large, so we shan't print it out.[嗯。相当大的,所以我们将无法打印出来。]
#[]
# However, these are the ac wavelets... Therefore if we compute their[然而,这些都是交流小波...因此,如果我们计算]
# inner product we should get the same as if we used the ipndacw[内的产品,我们应该得到相同的,如果我们使用ipndacw]
# function directly.[功能直接。]
#[]
P6mat
# [,1] [,2] [,3] [,4] [,5] [[1] [2] [3] [4] [5]]
#[1,] 1.839101e+00 3.215934e-01 4.058155e-04 8.460063e-06 4.522125e-08[[1] 1.839101e +00 3.215934e-01 4.058155e-04 8.460063e-06 4.522125e-08]
#[2,] 3.215934e-01 3.035353e+00 6.425188e-01 7.947454e-04 1.683209e-05[[2] 3.215934e-01 3.035353e +00 6.425188e-01 7.947454e-04 1.683209e-05]
#[3,] 4.058155e-04 6.425188e-01 6.070419e+00 1.285038e+00 1.589486e-03[[3] 4.058155e-04 6.425188e-01 6.070419e +00 1.285038e +00 1.589486e-03]
#[4,] 8.460063e-06 7.947454e-04 1.285038e+00 1.214084e+01 2.570075e+00[[4] 8.460063e-06 7.947454e-04 1.285038e +00 1.214084e +01 2.570075e +00]
#[5,] 4.522125e-08 1.683209e-05 1.589486e-03 2.570075e+00 2.428168e+01[[5] 4.522125e-08 1.683209e-05 1.589486e-03 2.570075e +00 2.428168e +01]
#[6,] 5.161675e-10 8.941666e-08 3.366416e-05 3.178972e-03 5.140150e+00[[6] 5.161675e-10 8.941666e-08 3.366416e-05 3.178972e-03 5.140150e +00]
# [,6] [[6]]
#[1,] 5.161675e-10[[1,] 5.161675e-10]
#[2,] 8.941666e-08[[2] 8.941666e-08]
#[3,] 3.366416e-05[[3] 3.366416e-05]
#[4,] 3.178972e-03[[4] 3.178972e-03]
#[5,] 5.140150e+00[[5] 5.140150e +00]
#[6,] 4.856335e+01[[6] 4.856335e +01]
#[]
# Let's check it against the ipndacw call[让我们来看看它对ipndacw调用]
#[]
ipndacw(-6, filter.number=10, family="DaubLeAsymm")
# -1 -2 -3 -4 -5 [-1 -2 -3 -4 -5]
#-1 1.839101e+00 3.215934e-01 4.058155e-04 8.460063e-06 4.522125e-08[-1 1.839101e +00 3.215934e-01 4.058155e-04 8.460063e-06 4.522125e-08]
#-2 3.215934e-01 3.035353e+00 6.425188e-01 7.947454e-04 1.683209e-05[-2 3.215934e-01 3.035353e +00 6.425188e-01 7.947454e-04 1.683209e-05]
#-3 4.058155e-04 6.425188e-01 6.070419e+00 1.285038e+00 1.589486e-03[-3 4.058155e-04 6.425188e-01 6.070419e +00 1.285038e +00 1.589486e-03]
#-4 8.460063e-06 7.947454e-04 1.285038e+00 1.214084e+01 2.570075e+00[-4 8.460063e-06 7.947454e-04 1.285038e +00 1.214084e +01 2.570075e +00]
#-5 4.522125e-08 1.683209e-05 1.589486e-03 2.570075e+00 2.428168e+01[-5 4.522125e-08 1.683209e-05 1.589486e-03 2.570075e +00 2.428168e +01]
#-6 5.161675e-10 8.941666e-08 3.366416e-05 3.178972e-03 5.140150e+00[-6 5.161675e-10 8.941666e-08 3.366416e-05 3.178972e-03 5.140150e +00]
# -6 [-6]
#-1 5.161675e-10[-1 5.161675e-10]
#-2 8.941666e-08[-2 8.941666e-08]
#-3 3.366416e-05[-3 3.366416e-05]
#-4 3.178972e-03[-4 3.178972e-03]
#-5 5.140150e+00[-5 5.140150e +00]
#-6 4.856335e+01[-6 4.856335e +01]
#[]
# Yep, they're the same.[是的,他们是相同的。]
#[]
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|