您好,显然这是因为您需要规范化数据,请查看以下示例:
# Parameters
w <- 30
alpha <- 4
# PAA
x <- df$power
paax <- PAA(x, w)
plot(x, type="l", main="PAA reduction of series x")
p <- rep(paax,each=length(x)/length(paax)) #just for plotting the PAA
lines(p, col="red")
# SAX
convert.to.SAX.symbol(paax , alpha)
# [1] 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4
# You need to scale PAA result
convert.to.SAX.symbol(scale(paax) , alpha)
# [1] 1 1 1 1 1 1 1 1 1 2 2 1 4 3 3 1 2 2 2 4 4 4 1 1 2 4 3 3 4 4
# SAX plot : with scaling this works
SAX.plot(as.ts(scale(df$power)), w=w, alpha=alpha)
这可能是您可以在函数帮助页面中找到的示例。