0
我想用SAX表示一些時間序列圖,以便我可以挖掘它們的相似之處。我正在使用R中的jmotif軟件包:使用jmotif包的R中的SAX時間序列表示
#Create an example dataframe
example1 <- data.frame(flow=c(1.1,2.2,3.3,4.4,5.5,6.6),
weight1=c(7.1,7.2,7.3,7.4,7.5,7.6),
weight2=c(8.1,8.2,8.3,8.4,8.5,8.6))
# Create a timeseries object
examplets1 <- ts(example1, start = 1, end = 6)
#Analysis
library(jmotif)
#Normalise the data using Znorm
examplezn <- znorm(examplets1, threshold = 0.01)
#Perform piecewise aggregate approximation
examplepaa <- paa(examplezn, 3)
#Represent time series as SAX
sax_via_window(examplepaa, 3, 3, 10, "mindist", 0.1)
#This produces the result
> sax_via_window(examplepaa, 3, 3, 10, "mindist", 0.1)
$`0`
[1] "bgh"
我無法解釋這些結果。我期望的是象徵性的表示,我可以將它與每列相關聯。流量:acc,weight1:bgh等。真正的數據集將有大約100列的ts數據!
我錯誤地應用該方法嗎?
任何幫助是極大的讚賞