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

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

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

                                        Variable Penalty Dynamic Time Warping function
                                         可变罚动态时间规整函数

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

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

Use variable penalty dynamic time warping to align one (or many) query signal(s) to a master signal. Penalties are incurred whenever a non-diagonal move is taken.
使用可变的罚款对准一个(或多个)查询信号(S)主信号的动态时间规整。处罚非对角线移动时产生的。


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


VPdtw(reference, query, penalty = 0, maxshift = 50,Reference.type=c("random","median","mean","trimmed"))



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

参数:reference
Reference signal, NULL or a vector, see details.
参考信号,NULL或一个向量,查看详细信息。


参数:query
Query signal, a vector or matrix, see details  
查询信号,一个向量或矩阵,详见


参数:penalty
Penalty term, a vector of same length as reference (not checked) or a matrix. See details. Default is 0 repeated to the length of reference
惩罚项,作为参考(未选中)或矩阵的相同的长度的矢量。查看详细信息。默认值是0重复的长度范围


参数:maxshift
Maximum allowable shift, an integer
允许的最大移位,一个整数


参数:Reference.type
Choices for reference if NULL is input
选择reference如果输入NULL是


Details

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

Performs variable penalty dynamic time warping of query to reference. Sakoe Chiba dtw used with width maxshift.
执行变量的刑罚动态时间规整query到reference。 Sakoe千叶县大田使用与宽度maxshift。

The basic operation aligns a query vector to a reference vector.
基本操作对齐一个query到reference矢量向量。

If reference is not specified and query is a matrix then the reference is created based on the value of Reference.type. The four choices are random, median, mean and trimmed. These choose a column of query at random as a reference, or the piecewise median, mean or trimmed mean (with trim=0.1) with missing values removed.
如果reference不指定和query是一个矩阵,那么创建的基础上的价值referenceReference.type。这四个选项是random,median,mean和trimmed。这些的query作为参考随机选择一列,或的分段中位数,意味着截尾均值(与装饰= 0.1)与缺失值的删除。

If query is a matrix and penalty is a vector then the same penalty is used to align each column of query to the reference. Different alignment paths are chosen for each column of the query matrix.
query如果是一个矩阵,penalty是一个向量,然后使用同样的刑罚调整每列的query的reference。选择不同的对齐路径query矩阵的每一列中。

If query is a vector and penalty is a matrix then the query is aligned to the reference several times, using each column of the penalty matrix in turn as the penalty for the alignment.
如果query是一个向量和penalty是一个矩阵,然后queryreference数次对齐,依次使用penalty矩阵的每一列作为对齐的惩罚。

If query and penalty are matrices then nothing happens. If you wish to align many query vectors and test many penalty vectors at the same time then do the appropriate looping (over queries, or penalties) outside of VPdtw.
如果query和penalty是矩阵,然后什么也没有发生。如果你想使许多查询向量和测试的处罚向量的同时,然后做相应的循环(通过查询,或罚款)以外的VPdtw。


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


参数:xVals
For plotting everything to correct index
对于绘制的一切正确的索引


参数:reference
reference vector used by VPdtw expanded by NAs for plotting
使用的VPdtw的参考矢量扩展来港的图


参数:query
query passed to VPdtw
查询传递给VPdtw


参数:penalty
penalty passed to VPdtw
刑罚传递到VPdtw的


参数:warpedQuery
result of alignment, same class as query
结果保持一致,同一类查询


参数:shift
shifts required to achieve alignment
实现对齐方式的转变需要


参数:summary
Summary information about the alignment. Used for print.VPdtw
对齐的摘要信息。用于print.VPdtw


参数:information
Information about the alignment. Used for print.VPdtw
信息的对齐。用于print.VPdtw


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


David Clifford, Glenn Stone



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

D; STONE, G; MONTOLIU, I; et al. ANALYTICAL CHEMISTRY Volume: 81 Issue: 3 Pages:

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

Also check out the dtw package by Toni Giorgino which covers many variations of dynamic time warping.
另外,检查出的的DTW包由的托尼Giorgino其中包括许多变化的动态时间规整。


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


  ## Citation[#引用]
  citation("VPdtw")

  ## Basic Examples of zero-penalty DTW[#基本的例子零处罚DTW]

  ## Example of exact fit in the middle[#示例完美贴合在中间]
  query <- c(1,5,4,3,9,8,5,2,6,5,4)
  reference <- c(rnorm(5),query,rnorm(5))
  lambda <- rep(0,length(reference))
  maxshift <- 11
  res <- VPdtw(reference,query,lambda,maxshift)
  plot(res)
  res

  ## Example of exact fit on one side[#示例一侧精确的配合]
  reference <- c(1,5,4,3,9,8,5,2,6,5,4)
  query <- c(rnorm(5),reference)
  reference <- c(reference,rnorm(5))
  lambda <- rep(0,length(reference))
  maxshift <- 6
  res <- VPdtw(reference,query,lambda,maxshift)
  plot(res)
  res

  ## Example of exact fit on the other side[#示例的精确配合的另一边]
  reference <- c(1,5,4,3,9,8,5,2,6,5,4)
  query <- c(reference,rnorm(5))
  reference <- c(rnorm(5),reference)
  lambda <- rep(0,length(reference))
  maxshift <- 6
  res <- VPdtw(reference,query,lambda,maxshift)
  plot(res)
  res

  ## Example of exact fit except where one query gets dropped and its all on one side[精确的配合,除了其中一个查询被丢弃,其所有一侧#示例]
  reference <- c(1,5,4,3,9,8,5,2,6,5,4)
  query <- c(reference[1:5],20,reference[6:11])
  reference <- c(rnorm(5),reference)
  query <- c(query,rnorm(5))
  lambda <- rep(0,length(reference))
  maxshift <- 6
  res <- VPdtw(reference,query,lambda,maxshift)
  plot(res)
  res
  
## Examples that use penalty term. Examples with long signals[#示例使用惩罚项。长信号的例子]

data(reference)
data(query)
## Do alignment on log scale[#做对数刻度对齐]
reference <- log(reference)
query <- log(query)

## VPdtw[#VPdtw]
result <- VPdtw(reference=reference[1:2500],query=query[1:2500],penalty=dilation(reference[1:2500],150)/4,maxshift=150)
plot(result)
result

## Zero penalty DTW[#零罚款DTW]
result2 <- VPdtw(reference=reference[1:2500],query=query[1:2500],penalty=rep(0,length(reference)),maxshift=150)
plot(result2)

## Try both penalties at the same time[#请尝试以下两种处罚同时]
penalty <- dilation(reference,350)/5
penalty <- cbind(penalty,rep(0,length(penalty)))

result <- VPdtw(reference,query,penalty=penalty,maxshift=350)
plot(result,"After")
plot(result,"Shift")
result

## All three plots at once[三幅图在一次#]
plot(result)


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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-11-26 03:28 , Processed in 0.019722 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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