如果我有一个时间序列集,例如 x=[0,2,5,2,3,1,0] 代表一个工件。
在更大的数据集 y 中匹配与 x 相似的集合的最佳方法是什么?
如果我有一个时间序列集,例如 x=[0,2,5,2,3,1,0] 代表一个工件。
在更大的数据集 y 中匹配与 x 相似的集合的最佳方法是什么?
我想到了一些方法,但这个列表远非详尽无遗:
http://cran.r-project.org/web/packages/pdc/index.html
http://www.cs.ucr.edu/~eamonn/SAX.htm
参见,例如, http: //link.springer.com/chapter/10.1007/978-0-387-84816-7_4
http://www.robjhyndman.com/papers/wang2.pdf
http://users.eecs.northwestern.edu/~goce/SomePubs/Similarity-Pubs/Chapter-ClusteringTimeSeries.pdf
您可以在 R 中执行此操作。您的时间序列数据由 表示,v
您希望匹配的模式由表示p
。返回匹配索引。
> v<-c(1,2,3,4,5,6,7,8,9,1,2,3,4,6,7,5,8,1,2,3,4,5)
> p<-"123"
> gregexpr(p,paste(v,collapse = ""))
[[1]]
[1] 1 10 18
attr(,"match.length")
[1] 3 3 3
attr(,"useBytes")
[1] TRUE