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

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

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

                                        Help page for a function
                                         帮助页面的功能

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

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

Takes two time series: one a real-valued discrete-time time series, timeseries, the other, groups, a time series containing factor levels. This function performs a discriminant analysis of groups on a subset of the best-correlating nondecimated wavelet packets of timeseries
注意到两个时间序列:一个实值离散的时间序列,时间序列,另一方面,组,时间序列包含因子水平。这个函数执行组的一个子集的相关nondecimated小波包的时间序列判别分析


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


makewpstDO(timeseries, groups, filter.number=10, family="DaubExPhase",
        mincor=0.69999999999999996)



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

参数:timeseries
The time series which is the "dependent variable", ie discrimination will be performed on the variables extracted from the non-decimated wavelet packet transform of this time series
这是“依赖变量的时间序列,即歧视将上执行从非抽取小波包提取的变量变换,此时间序列


参数:groups
The factor levels as a time series
作为一个时间序列的因子水平


参数:filter.number
The smoothness of the wavelet involved in the nondecimated wavelet packet transform. See filter.select
小波包变换的nondecimated参与的小波平滑。见filter.select


参数:family
The wavelet family, see filter.select
小波的家人,看到filter.select


参数:mincor
Variables from the nondecimated wavelet packet transform with correlations less than this argument will be discarded in the first pass, and not considered as possible useful discriminants
变量从所nondecimated的小波包变换的相关性较少比这个参数将被丢弃在第一轮,而不是视为可能有用的判别


Details

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

This function implements the "discrimination" version of the  "Wavelet packet transfer function modelling of nonstationary series" by Guy Nason and Theofanis Sapatinas, Statistics and Computing, /bold12, 45-56.
此功能实现了“歧视”版本“小波包的传递函数模型的非平稳系列”盖利晨和Theofanis Sapatinas,统计和计算,/ bold12,45-56。

The function first takes the non-decimated wavelet packet transform of timeseries using the wpst function. Then the set of nondecimated wavelet packets is put into matrix form using the wpst2discr function. The Best1DCols function selects those variables from the matrix whose correlation with the groups time series is greater than mincor. The selected variables are put into a reduced matrix.
该函数首先采用非抽取小波包变换timeseries使用wpst功能。然后nondecimated小波包组投入使用wpst2discr函数矩阵形式。 Best1DCols功能选择那些变量的矩阵,其groups时间序列的相关性大于mincor。选定的变量投入减少矩阵。

The next step, BMdiscr, performs a linear discriminant analysis of the groups values onto the reduced matrix. In principle, one could have carried out a discriminant analysis using the full matrix of all the packets, but the problem is not well-conditioned and computationally efficient. The strategy adopted by Nason and Sapatinas is to do a "first pass" to select a large number of "likely" variables that might contribute something to discrimination, and then carry out a "second pass" which performs a more detailed analysis to jointly determine which variables are the key ones for discrimination.
下一步,BMdiscr,执行上减少矩阵的线性判别分析groups值。原则,可以进行判别分析,使用全矩阵的所有数据包,但问题是没有得到很好的空调和计算效率。战略利晨和Sapatinas采用的是做一个“通”,选择了大量的“可能”变量可能有所贡献歧视的,然后进行“第二次”进行更详细的分析,共同确定哪些变量是关键的歧视。

Note, using the discriminant model developed here, it is possible to use future values of timeseries and the model to predict future values of groups. See example below.
请注意,这里的判别模型,它是可以使用timeseries和模型来预测未来的值groups的未来价值。见下面的例子。


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

An object of class wpstDO. This is a list containing the following components.
对象的类wpstDO。这是含有以下成分的列表。

<table summary="R valueblock"> <tr valign="top"><td>BPd</td> <td> Object returned from the BMdiscr function. Contains the reduced matrix and the discriminant object</td></tr> <tr valign="top"><td>BP</td> <td> Object returned from the Best1DCols function, essentially the reduced matrix and the groups variable.</td></tr> <tr valign="top"><td>filter</td> <td> The details of the wavelet filter used. This is used if the other components are used to perform discrimination on new data one needs to know what wavelet was used to perform the original nondecimated wavelet packet transform.</td></tr>  </table>
<table summary="R valueblock"> <tr valign="top"> <TD>BPd </ TD> <TD>从BMdiscr函数返回的对象。包含减少矩阵和判别对象</ TD> </ TR> <tr valign="top"> <TD> BP </ TD> <TD>从Best1DCols函数返回的对象,本质上是减少矩阵和组变量。</ TD> </ TR> <tr valign="top"> <TD> filter </ TD> <TD>的细节所用的小波滤波器。这是在其他组件使用,用于执行一个新的数据需求的歧视知道小波被用来执行原来的nondecimated小波包变换。</ TD> </ TR> </ TABLE>


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


G P Nason



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

basisplot.BP, Best1DCols, BMdiscr, wpst, wpst2discr, wpstCLASS
basisplot.BP,Best1DCols,BMdiscr,wpst,wpst2discr,wpstCLASS


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


#[]
# Use BabySS and BabyECG data for this example.[这个例子使用BabySS和BabyECG数据。]
#[]
# Want to predict future values of BabySS from future values of BabyECG[要预测未来的值BabySS未来的BabyECG值]
#[]
# Build model on first 256 values of both[前256个值两者建立模型]
#[]
data(BabyECG)
data(BabySS)
BabyModel <- makewpstDO(timeseries=BabyECG[1:256], groups=BabySS[1:256],
        mincor=0.5)
#[]
# The results (ie print out answer)[结果(即打印出答案)]
#BabyModel[BabyModel]
#Stationary wavelet packet discrimination object[平稳小波包歧视对象的]
#Composite object containing components:[1] "BPd"    "BP"     "filter"[复合对象,它包含的组件:[1]“桶”,“BP”,“过滤器”]
#Fisher's discrimination: done[费舍尔做的歧视:]
#BP component has the following information[BP组件具有以下信息]
#BP class object. Contains "best basis" information[BP类的对象。包含“最好的基础”的信息]
#Components of object:[1] "nlevels"     "BasisMatrix" "level"       "pkt"         "basiscoef"[的对象的组件:[1]“NLEVELS”BasisMatrix“,”电平“”在pkt“basiscoef”]
#[6] "groups"[[6]“群体”]
#Number of levels  8[水平数8]
#List of "best" packets[“最佳”包列表]
#Level id Packet id Basis coef[级别ID数据包ID基础系数]
#[1,]        4         0  0.7340580[[1] 4 0 0.7340580]
#[2,]        5         0  0.6811251[[2] 5 0 0.6811251]
#[3,]        6         0  0.6443167[[3] 6 0 0.6443167]
#[4,]        3         0  0.6193434[[4] 3 0 0.6193434]
#[5,]        7         0  0.5967620[[5] 7 0 0.5967620]
#[6,]        0         3  0.5473777[[6] 0 3 0.5473777]
#[7,]        1        53  0.5082849[[7] 1 53 0.5082849]
#[]
# You can plot the select basis graphically using[您可以绘制图形方式选择]
#[]
## Not run: basisplot(BabyModel$BP)[#不运行:basisplot(BabyModel BP)]
#[]
# An interesting thing are the final "best" packets, these form the[一个有趣的事情是最后的“最佳”的数据包,这些形式]
# "reduced" matrix, and the final discrimination is done on this[“减少”的矩阵,并且最终歧视上完成这]
# In this case 7 wavelet packets were identified as being good for[在这种情况下,7小波包被确定为好为]
# univariate high correlation.[单变量高度相关。]
#[]
# In the second pass lda analysis, using the reduced matrix, the following[在第二遍中lda的分析,使用缩减了的矩阵,以下]
# turns up as the best linear discriminant vectors[是最好的线性判别向量]
#[]
# The discriminant variables can be obtained by typing[可以通过以下方式获得的判别变量键入]
#BabyModel$BPd$dm$scaling[BPD BabyModel $ $ DM缩放]
#LD1        LD2[LD1 LD2]
#[1,] 5.17130434  1.8961807[[1,] 5.17130434 1.8961807]
#[2,] 1.56487144 -3.5025251[[2,] 1.56487144 -3.5025251]
#[3,] 1.69328553  1.1585477[[3] 1.69328553 1.1585477]
#[4,] 3.63362324  8.4543247[[4] 3.63362324 8.4543247]
#[5,] 0.15202947 -0.4530523[[5] 0.15202947 -0.4530523]
#[6,] 0.35659009 -0.3850318[[6] 0.35659009 -0.3850318]
#[7,] 0.09429836 -0.1281240[[7] 0.09429836 -0.1281240]
#[]
#[]
# Now, suppose we get some new data for the BabyECG time series.[现在,假设我们得到了一些新的BabyECG时间序列数据。]
# For the purposes of this example, this is just the continuing example[对于这个例子的目的,这仅仅是一个持续例如]
# ie BabyECG[257:512]. We can use our new discriminant model to predict[即BabyECG [257:512]。我们可以使用我们新的判别模型来预测]
# new values of BabySS[新的BabySS值]
#[]
BabySSpred <- wpstCLASS(newTS=BabyECG[257:512], BabyModel)
#[]
# Let's look at the first 10 (eg) values of this prediction[让我们来看看在第10(EG),这一预测值]
#[]
#BabySSpred$class[1:10][($)BabySSpred类[1:10]]
#[1] 4 4 4 4 4 4 4 4 4 4[[1] 4 4 4 4 4 4 4 4 4 4]
#Good. Now let's look at what the "truth" was:[好。现在,让我们来看看什么是“真理”是:]
#BabySS[257:267][BabySS [257:267]]
#[1] 4 4 4 4 4 4 4 4 4 4[[1] 4 4 4 4 4 4 4 4 4 4]
#Good. However, the don't agree everywhere, let's do a cross classification[好。然而,“不同意”无处不在,让我们做一个交叉分类]
#between the prediction and the truth.[之间的预测和真理。]
#[]
#&gt; table(tmp2$class, BabySS[257:512])[>表(TMP2类,BabySS [257:512])]
#[]
#      1   2   3   4[1 2 3 4]
#  1   4   1   1   0[1 4 1 1 0]
#  2 116   0  23   3[2 116 0 23 3]
#  4   2  12   0  94[4 2 12 0 94]
#[]
#So class 3 and 4 agree pretty much, but class 1 has been mispredicted at class[因此,3级和4同意漂亮多了,但被错误预测类1级]
#2 a lot.[2了很多。]

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-11-25 15:56 , Processed in 0.020464 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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