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

R语言 wavethresh包 MaNoVe.wst()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-10-1 17:26:28 | 显示全部楼层 |阅读模式
MaNoVe.wst(wavethresh)
MaNoVe.wst()所属R语言包:wavethresh

                                        Make Node Vector (using Coifman-Wickerhauser best-basis type algorithm) on nondecimated wavelet transform object
                                         节点矢量(夸夫曼Wickerhauser最好的基础类型算法)nondecimated小波变换对象

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

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

This method chooses a "best-basis" using the Coifman-Wickerhauser (1992) algorithm applied to nondecimated wavelet transform, wst.object, objects.
这种方法选择“最基础”的使用的Coifman Wickerhauser(1992)nondecimated小波变换算法,wst.object“对象。


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


## S3 method for class 'wst':
MaNoVe(wst, entropy=Shannon.entropy, verbose=FALSE,
        stopper=FALSE, alg="C", ...)



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

参数:wst
The wst object for which you wish to find the best basis for.
WST对象,你想找到最好的基础。


参数:entropy
The function used for computing the entropy of a vector
的功能,用于计算一个矢量的熵


参数:verbose
Whether or not to print out informative messages
无论打印出的信息性消息


参数:stopper
Whether the computations are temporarily stopped after each packet. This can be useful in conjunction with the verbose argument so as to see computations proceed one packet at a time.
是否计算每个数据包后,暂时停止。一并verbose参数,以看到计算的时间继续进行一个分组,这可能是有用的。


参数:alg
If "C" then fast compiled C code is used (in which case the entropy function is ignored and the C code uses an internal Shannon entropy. Otherwise, slower R code is used but an arbitrary entropy argument can be used
如果“C”,然后快速编译的C代码(在这种情况下,被忽略entropy函数和C代码使用一个内部的香农熵,否则,速度较慢的R代码的任意entropy参数可以使用


参数:...
Other arguments
其他参数


Details

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

Description says all
介绍说,所有的


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

A wavelet node vector object, of class nv, a basis description. This can be fed into a basis inversion using, say, the function InvBasis.
小波的的节点矢量对象,类nv“的基础描述。这可以被送入一个基础反转,也就是说,使用的功能InvBasis。


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


G P Nason



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

InvBasis, MaNoVe, MaNoVe.wp, Shannon.entropy, wst.object, wst
InvBasis,MaNoVe,MaNoVe.wp,Shannon.entropy,wst.object,wst


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


#[]
# What follows is a simulated denoising example. We first create our[下面是一个模拟去噪的例子。我们首先创建]
# "true" underlying signal, v. Then we add some noise to it with a signal[“真正”的相关信号,v。然后我们添加一些噪声信号]
# to noise ratio of 6. Then we take the packet-ordered non-decimated wavelet[噪声比为6。然后,我们把数据包排序,非抽取小波]
# transform and then threshold that.[改造和阈值。]
#[]
# Then, to illustrate this function, we compute a "best-basis" node vector[然后,来说明这个功能,我们计算“最基础”的节点矢量]
# and use that to invert the packet-ordered NDWT using this basis. As a[并使用反转分组排序NDWT此基础上。作为一个]
# comparison we also use the Average Basis method[比较,我们也可以使用平均法计算方法]
# (cf Coifman and Donoho, 1995). [(CF Coifman和Donoho提出,1995年)。]
#[]
# NOTE: It is IMPORTANT to note that this example DOES not necessarily[注:重要的是要注意,这个例子不一定]
# use an appropriate or good threshold or necessarily the right underlying[使用适当的还是不错的阈值,或者一定是正确的底层]
# wavelet. I am trying to show the general idea and please do not "quote" this[小波。我试图表明的总体思路和请不要“注明”]
# example in literature saying that this is the way that WaveThresh (or[例如,在文献说,这是方式,WaveThresh(或]
# any of the associated authors whose methods it attempts to implement)[任何相关的作者的方法,它试图实现)]
# does it. Proper denoising requires a lot of care and thought.[这样做了。正确的去噪需要大量的良苦用心。]
#[]
#[]
# Here we go....[在这里,我们离开了....]
#[]
# Create an example vector (the Donoho and Johnstone heavisine function)[创建一个示例矢量(在Donoho和Johnstone heavisine的功能)]
#[]
v <- DJ.EX()$heavi
#[]
# Add some noise with a SNR of 6[添加一些噪声,信噪比为6]
#[]
vnoise <- v + rnorm(length(v), 0, sd=sqrt(var(v))/6)
#[]
# Take packet-ordered non-decimated wavelet transform (note default wavelet[以分组下令非抽取小波变换(附注默认小波]
# used which might not be the best option for denoising performance).[这可能不是最好的选择,消噪性能)。]
#[]
vnwst <- wst(vnoise)
#[]
# Let's take a look at the wavelet coefficients of vnoise[让我们来看看在小波系数VNOISE]
#[]
## Not run: plot(vnwst)[#不运行:图(vnwst)]

#[]
# Wow! A huge number of coefficients, but mostly all noise.[哇!数量庞大的系数,但大多都是噪音。]
#[]
#[]
# Threshold the resultant NDWT object.[阈值的的结果NDWT对象。]
# (Once again default arguments are used which are certainly not optimal).[(再次使用默认参数肯定不是最优的)。]
#[]
vnwstT <- threshold(vnwst)
#[]
# Let's have a look at the thresholded wavelet coefficients[让我们一起来看看阈值的小波系数]
#[]
## Not run: plot(vnwstT)[#不运行:图(vnwstT)]

#[]
# Ok, a lot of the coefficients have been removed as one would expect with[好了,有很多的系数已被删除,正如人们所期望的]
# universal thresholding[普遍的阈值]
#[]
#[]
# Now select packets for a basis using a Coifman-Wickerhauser algorithm[现在选择的数据包使用夸夫曼Wickerhauser算法的基础]
#[]
vnnv <- MaNoVe(vnwstT)
#[]
# Let's have a look at which packets got selected[让我们看看哪些信息包是]
#[]
vnnv
# Level :  9  Action is  R (getpacket Index:  1 )[等级:9行动是R(getpacket指数:1)]
# Level :  8  Action is  L (getpacket Index:  2 )[等级:8行动的L(getpacket指数:2)]
# Level :  7  Action is  L (getpacket Index:  4 )[等级:7行动是L(getpacket指数:4)]
# Level :  6  Action is  L (getpacket Index:  8 )[等级:6行动是L(getpacket指数:8)]
# Level :  5  Action is  R (getpacket Index:  17 )[等级:5行动是R(getpacket指数:17)]
# Level :  4  Action is  L (getpacket Index:  34 )[等级:4行动是L(getpacket指数:34)]
# Level :  3  Action is  L (getpacket Index:  68 )[等级:3行动是L(getpacket指数:68)]
# Level :  2  Action is  R (getpacket Index:  137 )[等级:2动作是R(getpacket指数:137)]
# Level :  1  Action is  R (getpacket Index:  275 )[等级:1动作是R(getpacket指数:275)]
# There are  10  reconstruction steps[有10个重建的步骤]
#[]
# So, its not the regular decimated wavelet transform![因此,它不是普通的抽取小波变换!]
#[]
# Let's invert the representation with respect to this basis defined by[让我们反转表示此基础上定义的]
# vnnv[vnnv]
#[]
vnwrIB <- InvBasis(vnwstT, vnnv)
#[]
# And also, for completeness let's do an Average Basis reconstruction.[同时,完整性,让我们做一个平均法计算重建。]
#[]
vnwrAB <- AvBasis(vnwstT)
#[]
# Let's look at the Integrated Squared Error in each case.[让我们来看看在每一种情况下的积分平方误差。]
#[]
sum( (v - vnwrIB)^2)
# [1] 386.2501[[1] 386.2501]
#[]
sum( (v - vnwrAB)^2)
# [1] 328.4520[[1] 328.4520]
#[]
# So, for this limited example the average basis method does better. Of course,[因此,对于这有限的例子中,平均基准计算方法没有更好的。当然,]
# for *your* simulation it could be the other way round. "Occasionally", the[*你*模拟的,也可能是反过来。 “偶尔”]
# inverse basis method does better. When does this happen? A good question.[逆基础方法没有更好的。当出现这种情况呢?一个很好的问题。]
#[]
# Let's plot the reconstructions and also the original[让我们绘制的重建,也是原]
#[]
## Not run: plot(vnwrIB, type="l")[#不运行:的图(vnwrIB,类型为“L”)]
## Not run: lines(vnwrAB, lty=2)[#不运行:行(vnwrAB,LTY = 2)]
## Not run: lines(v, lty=3)[#不运行线(V,LTY = 3)]

#[]
# The dotted line is the original. Neither reconstruction picks up the[虚线是原始的。无论是重建拿起]
# spikes in heavisine very well. The average basis method does track the[在heavisine高峰很好。平均法计算的方法跟踪]
# original signal more closely though.[原始信号更加紧密了。]
#[]

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-11-25 15:34 , Processed in 0.036943 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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