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

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

[复制链接]
发表于 2012-10-1 11:53:58 | 显示全部楼层 |阅读模式
treethresh(treethresh)
treethresh()所属R语言包:treethresh

                                        Compute optimal thresholding partition for a sequence, matrix, or array of data.
                                         计算最优阈值分割序列,矩阵或数组中的数据。

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

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

This function carries out the tree-based thresholding algorithm described in section 3 of Evers and Heaton (2009).
此功能进行Evers和希顿(2009年)第3条中描述的基于树的阈值算法。


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


treethresh(data, beta, criterion="score", control=list(),
           rho=sys.frame(sys.parent()))



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

参数:data
An array (or an object coercible to an array, i.e. a vector or matrix) containing the data. The data is assumed to have noise of unit variance, thus the data needs to be rescaled a priori (e.g. in the case of wavelet coefficients using function estimate.sdev).
包含数据的一个数组(或转换到一个数组中的一个目的,即一个向量或矩阵)。数据被认为有噪声的单位方差,因此,需要对数据进行重新调整先验的(例如,在小波系数的情况下,使用功能estimate.sdev)。


参数:beta
Instead of using the original data, one can call wtthresh using the beta_i instead of the observed data. These can be computed using beta.laplace.
而不是使用原始的data,可以调用“wtthresh使用beta_i的观测数据。这些可以计算使用beta.laplace。


参数:criterion
The criterion to be used. Can be "score" (default) for using the score test, "likelihood" for using the likelihood ratio test (slower), "heuristic" for using a heuristic criterion based on the original data, or a user-specified function that computes the goodness of a split. This function should take four arguments (which should be self-explanatory), left_data, left_betas, right_data, and right_betas.
要使用的标准。可以"score"(默认)使用似然比检验(更慢)的得分测试,"likelihood"的,"heuristic"使用上的原始数据基于启发式的标准的,或用户指定的函数,计算一个分裂的美好。这个函数应该采取四个参数(这应该是不言自明的),left_data,left_betas,right_data,right_betas。


参数:control
A list that allows the user to tweak the behaviour of treethresh. It can contain the following elements:   
一个列表,允许用户调整的行为treethresh。它可以包含以下内容:

max.depthThe maximum depth of the tree. Defaults to 10.
max.depthThe树的最大深度。默认为10的。

minimum.widthThe minimum width of a region of the partitions. This setting avoids creating too small regions. Defaults to 3.
minimum.widthThe分区的区域的最小宽度。此设置可避免过小区域。默认为3的。

minimum.sizeThe minimum size of a region of the partitions. This setting avoids creating too small  regions. Defaults to 5^d, where d is the dimension of the arras.
minimum.sizeThe的最小尺寸的区域的分区。此设置可避免过小区域。默认为5^d,d是阿拉斯的尺寸。

lr.signifIf the p-value of the corresponding likelihood ratio test is larger than 1-lr.signif a split will be discarded. Defaults to 0.5.
lr.signifIf相应的似然比检验的p-值是大于1-lr.signif拆分将被丢弃。默认为0.5的。

absolute.improvementThe minimum absolute improvement of the above criterion necessary such that a split is retained. Defaults to -Inf, i.e. deactivated.
absolute.improvementThe最小绝对改善的必要的上述标准,使得保留分裂。默认为-Inf,即停用。

relative.improvementThe minimum relative improvement of the above criterion necessary such that a split is retained. Defaults to -Inf, i.e. deactivated.
relative.improvementThe最小相对改善的必要的上述标准,使得分裂被保留。默认为-Inf,即停用。

absolute.criterionThe minimum value of the above criterion necessary such that a split is retained. Defaults to 0, i.e. deactivated.
absolute.criterionThe最小值的上述标准必要的,使得分裂被保留。默认为0,即停用。

aThe parameter a of the Laplace distribution gamma(mu) = const * exp(-a*mu) corresponding to the signal. Defaults to 0.5.
七成参数a的拉普拉斯分布gamma(mu) = const * exp(-a*mu)对应于该信号。默认为0.5的。

beta.maxThe maximum value of beta. Defaults to 1e5.
beta.maxThe最高值beta。默认为1e5的。

max.iterThe maximum number of iterations when computing the estimate of the weight w in a certain region. Defaults to 30.  
max.iterThe最大迭代次数,当计算的估计的重量w在一定区域内。默认为30的。

tolerance.gradThe estimate of the weight w in a certain region is considered having converged, if the gradient of the likelihood is less than tolerance.grad. Defaults to 1e-8.
tolerance.gradThe估计的重量w在一定的区域被认为是具有融合,如果梯度的可能性小于tolerance.grad。默认为1e-8的。

toleranceThe estimate of the weight w in a certain region is considered having converged, if the estimates of the weight w change less than tolerance. Defaults to 1e-6.   
toleranceThe估计的重量w在一定区域内的被认为是融合的,如果估计的重量w改变小于tolerance。默认为1e-6的。


参数:rho
The environment used to evaluate the user-speficied criterion function if one is supplied). (You want to change this argument only in very rare circumstances).
所使用的环境评估用户speficied的判别函数,如果一个被供给)。 (您想改变这种说法只有在极少数的情况下)。


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

treethresh returns an object of the class c("treethresh"), which is a list containing the following elements: <table summary="R valueblock"> <tr valign="top"><td>splits</td> <td> A table describing the detailed structure of the fitted tree together with the local loglikelihoods required for the pruning.</td></tr> <tr valign="top"><td>membership</td> <td> An array of the same dimension as data or beta indicating to which region each entry of the array of data belongs.</td></tr> <tr valign="top"><td>beta</td> <td> The values of beta for each observation / coefficient.</td></tr>   <tr valign="top"><td>data</td> <td> The data used.</td></tr> <tr valign="top"><td>criterion</td> <td> The criterion used to decide on splits (see argument criterion).</td></tr> <tr valign="top"><td>control</td> <td> The control list of tuning options used (see argument control).</td></tr> </table>
treethresh返回一个对象类c("treethresh"),这是一个列表,其中包含以下元素:<table summary="R valueblock"> <tr valign="top"> <TD>splits </ TD> <td>一个表一起的修剪与需要当地loglikelihoods,,描述的详细结构的拟合树。</ TD> </ TR> <tr valign="top"> <TD><X > </ TD> <TD>数组的尺寸相同membership或data表明每个条目的数组中的数据属于哪个区域。</ TD> </ TR> <TR VALIGN =“”> <TD>beta </ TD> <TD>的值beta每个观察/系数。</ TD> </ TR> <TR VALIGN =“顶” > <TD> beta </ TD> <TD>使用的数据。</ TD> </ TR> <tr valign="top"> <TD> data</ TD> <TD使用的标准上分裂(见参数criterion)</ TD> </ TR> <tr valign="top"> <TD> criterion </ TD> <TD>的决定控制列表的调节选项(见参数control)</ TD> </ TR> </表>


参考文献----------References----------

Evers, L. and Heaton, T. (2009) Locally Adaptive Tree-Based Thresholding. Journal of Computational and Graphical Statistics.  Dec 2009, Vol. 18, No. 4: 961-977.

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


# (1) Create a vector with the probabilities of a signal being present[(1)创建一个矢量信号存在的概率]
w.true <- c(rep(0.1,400),rep(0.7,300),rep(0.1,300))

# (2) Generate the signal[(2)生成的信号]
mu <- numeric(length(w.true))
non.zero.entry <- runif(length(mu))<w.true
num.non.zero.entries <- sum(non.zero.entry)
mu[non.zero.entry] <- rexp(num.non.zero.entries,rate=0.5)*sample(c(-1,1),num.non.zero.entries,replace=TRUE)

# (3) Split graphics device[(3)分割图形设备]
par(mfrow=c(2,2))

# (3) Draw the true signal (signal present in red)[(3)画出真正的信号(信号存在于红)]
plot(mu,col=non.zero.entry+1)
title("True signal")

# (4) Add noise to the signal[(4)噪声的信号]
x <- mu + rnorm(length(mu))

# (5) Plot the noisy signal (signal present in red)[(5)绘制噪声信号(信号存在于红)]
plot(x,col=non.zero.entry+1)
title("Noisy signal")

# (6) Carry out the tree-based thresholding[(6)开展基于树的阈值]
tt <- treethresh(x)

# (7) Prune the tree[(7)修剪树]
tt.pruned <- prune(tt)

# (8) Threshold the signal according to the pruned tree[(8)根据修剪树阈值的信号]
mu.hat <- thresh(tt.pruned)

# (9) Print the denoised signal[(9)打印降噪信号]
plot(mu.hat,col=non.zero.entry+1)
title("Denoised signal")

# (10) Add solid lines for splits (lines removed by the pruing are dashed)[(10)实线分割(由pruing的行删除虚线)]
abline(v=tt$split[,"pos"],lty=2)
abline(v=tt.pruned$split[,"pos"],lty=1)

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-11-30 01:32 , Processed in 0.024063 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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