dwt(wavelets)
dwt()所属R语言包:wavelets
Discrete Wavelet Transform
离散小波变换
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Computes the discrete wavelet transform coefficients for a univariate or multivariate time series.
计算单变量和多变量时间序列的离散小波变换系数。
用法----------Usage----------
dwt(X, filter="la8", n.levels, boundary="periodic", fast=TRUE)
参数----------Arguments----------
参数:X
A univariate or multivariate time series. Numeric vectors, matrices and data frames are also accepted.
单变量和多变量的时间序列。数字向量,矩阵,数据框也可以接受。
参数:filter
Either a wt.filter object, a character string indicating which wavelet filter to use in the decomposition, or a numeric vector of wavelet coefficients (not scaling coefficients). See help(wt.filter) for acceptable filter names.
要么是wt.filter对象,一个字符串指示小波滤波器中使用的分解,或一个数值向量的小波系数(不是缩放系数)。见help(wt.filter)可以接受的过滤器名称。
参数:n.levels
An integer specifying the level of the decomposition. By default this is the value J such that the length of X is at least as great as the length of the level J wavelet filter, but less than the length of the level J+1 wavelet filter. Thus, j <= log((N-1)/(L-1)+1), where N is the length of X.
一个整数,指定的分解的水平。默认情况下,这是通过,值J的长度X是至少一样大,水平J小波滤波器的长度,但小于水平的长度J+1小波过滤。因此,j <= log((N-1)/(L-1)+1),其中N的长度X。
参数:boundary
A character string indicating which boundary method to use. boundary = "periodic" and boundary = "reflection" are the only supported methods at this time.
一个字符串,表示使用的边界法。 boundary = "periodic"和boundary = "reflection"是此时唯一支持的方法。
参数:fast
A logical flag which, if true, indicates that the pyramid algorithm is computed with an internal C function. Otherwise, only R code is used in all computations.
一个逻辑标志,如果情况属实,表明金字塔算法计算与内部C函数。否则,只有R代码是用在所有的计算。
Details
详细信息----------Details----------
The discrete wavelet transform is computed via the pyramid algorithm, using pseudocode written by Percival and Walden (2000), pp. 100-101. When boundary="periodic" the resulting wavelet and scaling coefficients are computed without making changes to the original series - the pyramid algorithm treats X as if it is circular. However, when boundary="reflection" a call is made to extend.series, resulting in a new series which is reflected to twice the length of the original series. The wavelet and scaling coefficients are then computed by using a periodic boundary condition on the reflected sereis, resulting in twice as many wavelet and
离散小波变换的金字塔算法通过计算,使用伪代码写的波斯富街和Walden(2000年),页100-101。当boundary="periodic"产生的小波和尺度系数计算,而不改变原始的系列 - 金字塔算法将X,如果它是圆的。然而,当boundary="reflection"一个呼叫作出extend.series,产生一个新的系列被反射到原始的系列的长度的两倍。小波和尺度系数,然后计算通过使用周期性边界条件的反映sereis上,导致的两倍多小波
值----------Value----------
Returns an object of class dwt, which is an S4 object with slots
返回一个对象类dwt,这是一个与槽S4对象
参数:W
A list with element i comprised of a matrix containing the ith level wavelet coefficients.
列表元素ii个层次的小波系数组成的矩阵。
参数:V
A list with element i comprised of a matrix containing the ith level scaling coefficients.
列表元素i组成的一个矩阵包含i个级缩放系数。
参数:filter
A wt.filter object containing information for the filter used in the decomposition. See help(wt.filter) for details.
Awt.filter对象,其中包含的信息使用的过滤器的分解。见help(wt.filter)的详细信息。
参数:level
An integer value representing the level of wavelet decomposition.
一个整数值,表示小波分解的水平。
参数:n.boundary
A numeric vector indicating the number of boundary coefficients at each level of the decomposition.
甲数值向量表示边界系数的数目在每个级别的分解。
参数:boundary
A character string indicating the boundary method used in the decomposition. Valid values are "periodic" or "reflection".
一个字符串,表示边界的分解方法。有效的值是“定期”或“反思”。
参数:series
The original time series, X, in matrix format.
原来的时间序列,X,以矩阵格式。
参数:class.X
A character string indicating the class of the input series. Possible values are "ts", "mts", "numeric", "matrix", or "data.frame".
一个字符串,指示输入系列之类的。可能的值是"ts","mts","numeric","matrix"或"data.frame"。
参数:attr.X
A list containing the attributes information of the original time series, X. This is useful if X is an object of class ts or mts and it is desired to retain relevant time information. If the original time series, X, is a matrix or has no attributes, then attr.X is an empty list.
一个列表,其中包含的属性信息的原始时间序列,X。 ,这是非常有用的,如果X是类的一个对象ts或mts“,它希望保留相应的时间信息。如果原来的时间序列,X,是一个矩阵或没有属性,那么attr.X是一个空列表。
参数:aligned
A logical value indicating whether the wavelet and scaling coefficients have been phase shifted so as to be aligned with relevant time information from the original series. The value of this slot is initially FALSE and can only be changed to TRUE via the align function, with the dwt object as input.
一个逻辑值,指示是否小波和缩放系数相移,以符合相关的时间信息从原始的系列。该插槽是最初的值FALSE,只能通过aligndwt对象作为输入功能,更改为TRUE。
参数:coe
A logical value indicating whether the center of energy method was used in phase alignement of the wavelet and scaling coefficients. By default, this value is FALSE (and will always be FALSE when aligned is FALSE) and will be set to true if the dwt object is phase shifted via the align function and center of energy method.
一个逻辑值,该值指示是否在相alignement小波和缩放系数使用中心的能源法。默认情况下,这个值是FALSE(将永远是虚假的,当aligned是FALSE)将被设置为true,如果dwt对象是通过align函数和中心相移能源法。
(作者)----------Author(s)----------
Eric Aldrich. ealdrich@gmail.com.
参考文献----------References----------
参见----------See Also----------
modwt, wt.filter.
modwt,wt.filter。
实例----------Examples----------
# obtain the two series listed in Percival and Walden (2000), page 42[获得这两个系列在波斯富街和Walden(2000)上市,第42页]
X1 <- c(.2,-.4,-.6,-.5,-.8,-.4,-.9,0,-.2,.1,-.1,.1,.7,.9,0,.3)
X2 <- c(.2,-.4,-.6,-.5,-.8,-.4,-.9,0,-.2,.1,-.1,.1,-.7,.9,0,.3)
# combine them and compute DWT[它们结合在一起,计算DWT]
newX <- cbind(X1,X2)
wt <- dwt(newX, n.levels=3, boundary="reflection", fast=FALSE)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|