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

R语言 robfilter包 robust.filter()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-9-27 21:04:29 | 显示全部楼层 |阅读模式
robust.filter(robfilter)
robust.filter()所属R语言包:robfilter

                                        Robust Filtering Methods for Univariate Time Series
                                         单变量时间序列的鲁棒滤波方法

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

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

Procedure for robust (online) extraction of low frequency components (the signal) from a univariate time series with optional rules for outlier replacement and shift detection.
鲁棒的(在线)提取的低频分量(信号)从一个单变量的时间序列与离群值的替换和移位检测可选规则的程序。


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


                        shiftd = 2, wshift = floor(width/2), lbound = 0.1, p = 0.9,
                        adapt = 0, max.width = width,



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

参数:y
a numeric vector or (univariate) time series object.
一个数值向量或单变量时间序列对象。


参数:width
a positive integer defining the window width used for fitting. If online=FALSE (default) this needs to be an odd number.
一个正整数限定用于拟合的窗口宽度。如果online=FALSE(默认情况下),这是一个奇数。


参数:trend
a character string defining the method to be used for robust approximation of the signal  within one time window. Possible values are:<br>     
一个字符的字符串,用于定义要用于一个时间窗口内的信号的鲁棒近似方法。可能的值是:参考

"MED":Median  
"MED":中位数

"RM":Repeated Median regression (default)  
"RM":反复中位数回归(默认)

"LTS"east Trimmed Squares regression  
"LTS":最不修剪最小二乘回归

"LMS"east Median of Squares regression      
"LMS":中位数平方回归


参数:scale
a character string defining the method to be used for robust estimation of the local  variability (within one time window).  Possible values are:<br>     
一个字符的字符串,用于定义的方法,可以使用的局部变异(一个时间窗口内)的鲁棒估计。可能的值是:参考

"MAD":Median absolute deviation about the median  
"MAD":中位数的中位数绝对偏差

"QN":Rousseeuw's and Croux' (1993) Q_n scale estimator (default)  
"QN":Rousseeuw和克鲁(1993)Q_n规模估计(默认)

"SN":Rousseeuw's and Croux' (1993) S_n scale estimator  
"SN":Rousseeuw和克鲁“(1993年)S_n规模估计

"LSH"ength of the shortest half        
"LSH":长度最短的一半


参数:outlier
a single character defining the rule to be used for outlier detection and outlier treatment.  Observations deviating more than d* &sigma;_t  from the current level approximation &mu;_t  are replaced by &mu;_t +/- k &sigma;_t where &sigma;_t denotes the current scale estimate. <br> Possible values are:<br>     
一个单一的字符定义的规则,使用的孤立点检测和异常处理。观察偏离超过d* &sigma;_t从目前的水平近似的&mu;_t取代&mu;_t +/- k &sigma;_t其中&sigma;_t表示当前的规模估计。 <br>可能的值是:参考

"T":Replace ('trim') large outliers detected by a 3&sigma;-rule  (d=3) by the current level estimate (k=0). (default)  
"T":更换(装饰)大离群检测到一个3&sigma;-规则(d=3),估计目前的水平(k=0)。 (默认)

"L":Shrink large outliers (d=3) strongly  towards the current level estimate (k=1).  
"L":收缩大的异常值(d=3)强烈对目前的水平估计(k=1)。

"M":Shrink large and moderatly sized outliers (d=2) strongly  towards the current level estimate (k=1).  
"M":收缩尺寸大,中度异常值(d=2)强烈对目前的水平估计(k=1)。

"W":Shrink large and moderatly sized outliers (d=2)  towards the current level estimate (k=2).     W is the most efficient, T the most robust method (which should ideally  be combined with a suitable value of lbound).   
"W":缩小尺寸大,中度异常值(d=2)(k=2)对目前的水平估计。 W是最有效的,T最可靠的方法(最好应加上一个合适的值lbound)。


参数:shiftd
a positive numeric value defining the factor the current scale estimate is multiplied  with for shift detection. Default is shiftd=2  corresponding to a 2&sigma; rule for shift detection.
一个正的数值乘以定义的因素,目前的规模估计为转移的检测。默认是shiftd= 2对应一个2&sigma;规则位移侦测。


参数:wshift
a positive integer specifying the number of the most recent observations used for shift detection (regulates therefore also the delay of shift detection). Only used in the online mode; should be less than half the (minimal) window width then. In the offline mode (online=FALSE, default), shift detection is based on the right half of the time window, i.e. wshift=floor(width/2) (default).
一个正整数指定的数目的最近的观测用于移位检测(调节因此也移位检测的延迟)。仅用于online模式,应该是不到一半的(最小的)窗口宽度。在离线模式下(online=FALSE,默认值),是根据移动检测的时间窗口上的右半部分,即wshift=floor(width/2)(默认值)。


参数:lbound
a positive real value specifying an optional lower bound for the scale to prevent  the scale estimate from reaching zero (implosion).   
一个正实数,指定一个可选的规模,以防止规模估计达到零(内爆)的下限。


参数:p
a fraction in [2/3,1] of observations  for additional rules in case of only two or three different values  within one window.<br> If 100 percent of the observations within one window take on  only two different values, the current level is estimated by the  mean of these values regardless of the trend  specification. In case of three differing values the median is  taken as the current level estimate.
一小部分in [2/3,1]观测的其他规则的情况下在一个窗口中只有两个或三个不同的值。<br>如果在一个窗口中100%的观测值只有采取两种不同的价值观,目前的水平估计这些值的平均值的trend规范无关。在三个不同的值的情况下,被取为电流电平的估计中位数。


参数:adapt
a numeric value  defining the fraction which regulates the adaption of the moving window width. adapt can be either 0 or a value in [0.6,1] .  adapt = 0 means that a fixed window width is used.  Otherwise, the window width is reduced whenever more than a fraction of  adapt in [0.6,1] of the residuals in a certain part of the current time window are all positive or all negative.
一个数字值,该值限定馏分调节的移动窗口宽度适应。 adapt可以是0或值in [0.6,1]。 adapt = 0是指一个固定的窗口宽度。否则,窗口宽度减小时,一小部分超过adaptin [0.6,1]的当前的时间窗口中的某一部分的残差都是正的或全部为负。


参数:max.width
a positive integer (>= width) specifying the maximal width of the time window.<br> width specifies the minimal (and also the initial) width.
一个正整数(>= width)指定的时间窗口的最大宽度。<br>文章width指定最小的(初始)的宽度。


参数:online
a logical indicating whether the current level and  scale estimates are evaluated at the most recent time  within each window (TRUE) or centered within the window  (FALSE). online=FALSE (default) requires an odd  width for the window and means a time delay of  (width+1)/2 time units.
逻辑指示是否目前的水平和规模估计在最近的时间内每个窗口评价(TRUE)或集中在该窗口内(FALSE)。 online=FALSE(默认)需要一个奇数width窗口和装置的时间延迟(width1)/ 2个时间单位。


参数:extrapolate
a logical indicating whether the level  estimations should be extrapolated to the edges of the time series. <br> If online=FALSE the extrapolation consists of the  fitted values within the first half of the first window and the  last half of the last window; if online=TRUE the  extrapolation consists of all fitted values within the first  time window.   
一个逻辑指示的水平估计是否应当推断的时间序列的边缘。 <br>如果online=FALSE外推由上半年的第一个窗口和后半段的最后一个窗口内的拟合值;如果online=TRUE外推,在第一时间内由所有的拟合值窗口。


Details

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

robust.filter works by applying the methods  specified by trend and scale to a moving time  window of length width.
robust.filter的工作原理是采用指定的方法trend和scale移动时间窗口的长度width。

Before moving the time window, it is checked whether the next  (incoming) observation is considered an 'outlier' by applying the  rule specified by outlier. Therefore, the trend in the  current time window is extrapolated to the next point in time and  the residual of the incoming observation is standardised by the  current scale estimate.
在移动的时间窗口,下(传入)观察,检查是否被认为是“离群”,应用该规则指定的outlier。因此,在当前的时间窗口中的趋势外推到下一个点的时间,由目前的规模估计残余传入的观察是标准化的。

After moving the time window, it can be tested whether a level  shift has occurred within the window: If more than half of the  residuals in the right part of the window are larger than  shiftd*&sigma;_t, a shift is detected and  appropriate actions are taken. In the online mode, the number of the rightmost residuals can be chosen by wshift to regulate the resistance of the detection rule against outliers, its power and the time delay of detection.
移动的时间窗口中后,它可以被测试是否已发生一个电平移位窗口内的:如果在窗口的右侧部分的一半以上的残差大于shiftd  *&sigma;_t,换档被检测到,并采取适当的行动。在online模式,最右边的残差的数目可以选择由wshift调节对异常值,它的功率和检测的时间延迟的电阻的检测规则。

A more detailed description of the filter can be found in Fried  (2004). The adaption of the window width is described by Gather and Fried (2004). For more explanations on shift detection, see Fried
的过滤器的更详细的描述,油炸(2004年)中可以找到。适应窗口宽度收集和炒(2004年)。上移检测更多的解释,请参阅炒


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

robust.filter returns an object of class robust.filter.   An object of class robust.filter is a list containing the  following components:
robust.filter返回一个对象类robust.filter。一个对象的类robust.filter的是一个列表,其中包含以下组件:


参数:level
a numeric vector containing the signal level extracted by the (regression) filter specified by trend, scale and outlier.
一个数值向量提取的信号电平(回归)过滤器指定的trend,scale和outlier。


参数:slope
a numeric vector containing the corresponding slope within each time window.
一个数值向量含有相应的每个时间窗口内的斜率。


参数:sigma
a numeric vector containing the corresponding scale within each time window.
每个时间窗口内包含相应规模的一个数值向量。


参数:ol
an outlier indicator.  0: no outlier, +1: positive outlier, -1: negative outlier
离群值的指标。 0:没有离群值,+1:正离群,-1:负异常值


参数:level.shift
a level shift indicator. 0: no level shift, t: positive level shift detected at processing time t, -t: negative level shift detected at processing time t (the position in the vector gives an estimate of the point in time before which the shift has occurred).  
一个电平移位指示器。 0:无电平转换,T:阳性检测到的电平转换处理时间t,-T:处理时间t(向量中的位置给出了一个估计的时间点之前发生了转变)的负电平漂移。

In addition, the original input time series is returned as list  member y, and the settings used for the analysis are  returned as the list members width, trend,  scale, outlier, shiftd,  wshift, lbound,  p, adapt, max.width, online and extrapolate.
此外,返回原来的输入时间序列返回列表成员列表成员y,用于分析和设置width,trend,scale, outlier,shiftd,wshift,lbound,p,adapt,max.width,online和extrapolate。

Application of the function plot to an object of class robust.filter returns a plot showing the original time series  with the filtered output.
应用的功能plot对象的类robust.filter返回一个图,显示的原始时间序列的过滤输出。


注意----------Note----------

Missing values have to be replaced or removed from the time series  before applying robust.filter.
遗漏值必须从时间序列在提出申请前robust.filter替换或删除。


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


Roland Fried and Karen Schettlinger



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

Trends, Journal of Nonparametric Statistics 16,  313-328.<br> (earlier version: http://www.sfb475.uni-dortmund.de/berichte/tr30-03.ps)
Computational Statistics and Data Analysis, Special Issue on Machine Learning and Robust Data Mining 52, 221-233.<br> (earlier version: http://www.sfb475.uni-dortmund.de/berichte/tr48-06.pdf)
COMPSTAT 2004: Proceedings in Computational Statistics, J. Antoch (eds.), Physika-Verlag, Heidelberg, 159-170. <br>
for Intensive Care Monitoring: Beyond the Running Median, Biomedizinische Technik 51(2), 49-56.

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

robreg.filter, hybrid.filter, dw.filter, wrm.filter.
robreg.filter,hybrid.filter,dw.filter,wrm.filter。


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


# Generate random time series:[生成随机时间序列:]
y <- cumsum(runif(500)) - .5*(1:500)
# Add jumps:[添加跳转:]
y[200:500] <- y[200:500] + 5
y[400:500] <- y[400:500] - 7
# Add noise:[添加噪声:]
n <- sample(1:500, 30)
y[n] <- y[n] + rnorm(30)

# Delayed Filtering of the time series with window width 23:[窗口宽度23延迟的时间序列进行筛选:]
y.rf <- robust.filter(y, width=23)
# Plot:[图:]
plot(y.rf)

# Delayed Filtering with different settings and fixed window width 31:[延迟过滤不同的设置,固定窗口宽度31:]
y.rf2 <- robust.filter(y, width=31, trend="LMS", scale="QN", outlier="W")
plot(y.rf2)

# Online Filtering with fixed window width 24:[在线过滤与固定窗口宽度24:]
y.rf3 <- robust.filter(y, width=24, online=TRUE)
plot(y.rf3)

# Delayed Filtering with adaptive window width (minimal width 11, maximal width 51):[延迟滤波自适应窗口宽度(最小11,最大宽度51):]
y.rf4 <- robust.filter(y, width=11, adapt=0.7, max.width=51)
plot(y.rf4)

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-11-25 04:08 , Processed in 0.020195 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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