putC.mwd(wavethresh)
putC.mwd()所属R语言包:wavethresh
Put smoothed data into wavelet structure
将平滑数据转换成小波结构
译者:生物统计家园网 机器人LoveR
描述----------Description----------
The smoothed and original data from a multiple wavelet decomposition structure, mwd.object, (e.g. returned from mwd) are packed into a single matrix in that structure. This function copies the mwd.object, replaces some smoothed data in the copy, and then returns the copy.
平滑的,原始数据从多小波分解结构,mwd.object,(例如,返回mwd)打包成一个矩阵在该结构中。该函数将mwd.object,取代了一些平滑后的数据在副本中,然后返回副本。
用法----------Usage----------
## S3 method for class 'mwd':
putC(mwd, level, M, boundary = FALSE, index = FALSE, ...)
参数----------Arguments----------
参数:mwd
Multiple wavelet decomposition structure whose coefficients you wish to replace.
多小波分解结构,您要更换的系数。
参数:level
The level that you wish to replace.
的水平,你要更换。
参数:M
Matrix of replacement coefficients.
矩阵的替代系数。
参数:boundary
If boundary is FALSE then only the "real" data is replaced (and it is easy to predict the required length of M). If boundary is TRUE then you can replace the boundary values at a particular level as well (but it is hard to predict the required length of M, and the information has to be obtained from the mfirst.last database component of mwd).
如果boundary是FALSE那么只有“真正”的数据被替换(很容易预测所需的长度M)。如果边界是TRUE,那么你可以替换的边界值在一个特定的水平(但它是很难预测的M所需的长度,和mfirst.last数据库组件的信息,必须获得mwd“)。
参数:index
If index is TRUE then the index numbers into the mwd$C array where the matrix M would be stored is returned. Otherwise, (default) the modified mwd.object is returned.
如果指数是TRUE到mwd$C数组,其中的矩阵M将被存储的索引编号,则返回。否则,(默认)修改后的mwd.object返回。
参数:...
any other arguments
任何其他参数
Details
详细信息----------Details----------
The mwd function produces a wavelet decomposition structure.
mwd函数产生的小波分解结构。
The need for this function is a consequence of the pyramidal structure of Mallat's algorithm and the memory efficiency gain achieved by storing the pyramid as a linear matrix of coefficients. PutC obtains information about where the smoothed data appears from the fl.dbase component of mwd, in particular the array fl.dbase$first.last.c which gives a complete specification of index numbers and offsets for mwd$C.
此功能的必要性是Mallat的算法和实现作为线性矩阵系数存储金字塔内存效率增益的金字塔结构的一个后果。 PUTC获得信息的平滑的数据显示从MWD的fl.dbase组成部分,在特定的阵列fl.dbase$first.last.c为mwd$C给出了完整规范的索引号和偏移量。
Note also that this function only puts information into mwd class objects. To extract coefficients from mwd structures you have to use the accessC.mwd function.
还要注意的是此功能只把信息mwd类对象。从mwd结构具有使用accessC.mwd功能的的提取系数。
See Downie and Silverman, 1998.
请参阅:唐尼和Silverman,1998年。
值----------Value----------
An object of class mwd.object if index is FALSE, otherwise the index numbers indicating where the M matrix would have been inserted into the mwd$C object are returned.
类的一个对象mwd.object如果index是FALSE,否则该索引数字表明M矩阵将被插入到mwd$C对象被返回。
RELEASE----------RELEASE----------
Version 3.9.6 (Although Copyright Tim Downie 1995-6).
版本3.9.6(虽然版权蒂姆·唐尼1995-96)。
(作者)----------Author(s)----------
G P Nason
参见----------See Also----------
accessC.mwd, accessD.mwd, draw.mwd, mfirst.last, mfilter.select, mwd, mwd.object, mwr, plot.mwd, print.mwd, putD.mwd, summary.mwd, threshold.mwd, wd, wr.mwd.
accessC.mwd,accessD.mwd,draw.mwd,mfirst.last,mfilter.select,mwd,mwd.object,mwr,plot.mwd,print.mwd,putD.mwd,summary.mwd,threshold.mwd,wd,wr.mwd。
实例----------Examples----------
#[]
# Generate an mwd object[生成的MWD对象]
#[]
tmp <- mwd(rnorm(32))
#[]
# Now let's examine the finest resolution smooth...[现在,让我们来看看最优秀的分辨率流畅...]
#[]
accessC(tmp, level=3)
# [,1] [,2] [,3] [,4] [,5] [,6] [[1] [2] [3] [4] [5] [6]]
#[1,] -0.4669103 -1.3150580 -0.7094966 -0.1979214 0.32079986 0.5052254[[1] -0.4669103 -1.3150580 -0.7094966 -0.1979214 0.32079986 0.5052254]
#[2,] -0.7645379 -0.8680941 0.1004062 0.6633268 -0.05860848 0.5757286[[2] -0.7645379 -0.8680941 0.1004062 0.6633268 -0.05860848 0.5757286]
# [,7] [,8] [[7] [8]]
#[1,] 0.5187380 0.6533843[[1,] 0.5187380 0.6533843]
#[2,] 0.2864293 -0.4433788[[2,] 0.2864293 -0.4433788]
#[]
# A matrix. There are two rows one for each father wavelet in this [一个矩阵。有两行一个为每个父亲小波在此]
# two-ple multiple wavelet transform and at level 3 there are 2^3 columns.[两个简单的多小波变换和3级有2 ^ 3列。]
#[]
# Let's set the coefficients of the first father wavelet all equal to zero[让我们设置的系数都等于零的第一个父亲小波]
# for this examples[这个例子]
#[]
newcmat <- accessC(tmp, level=3)
newcmat[1,] <- 0
#[]
# Ok, let's insert it back at level 3[好吧,让我们将它插入3级]
#[]
tmp2 <- putC(tmp, level=3, M=newcmat)
#[]
# And check it[并检查它]
#[]
accessC(tmp2, level=3)
# [,1] [,2] [,3] [,4] [,5] [,6] [,7] [[1] [2] [3] [4] [5] [6] [7]]
#[1,] 0.0000000 0.0000000 0.0000000 0.0000000 0.00000000 0.0000000 0.0000000[[1,] 0.0000000 0.0000000 0.0000000 0.0000000 0.00000000 0.0000000 0.0000000]
#[2,] -0.7645379 -0.8680941 0.1004062 0.6633268 -0.05860848 0.5757286 0.2864293[[2] -0.7645379 -0.8680941 0.1004062 0.6633268 -0.05860848 0.5757286 0.2864293]
# [,8] [[8]]
#[1,] 0.0000000[[1,] 0.0000000]
#[2,] -0.4433788[[2,] -0.4433788]
#[]
# Yep, all the first father wavelet coefficients at level 3 are now zero.[是的,所有的第一个父亲级别为3级小波系数为零。]
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|