There is a function called MINDIST.SAX
in package TSclust. Here is the body of the function:
require(TSclust)
> MINDIST.SAX
function (x, y, alpha, n)
{
w <- length(x)
symb <- SAX.breakpoints.table(alpha)
d <- 0
for (i in 1:w) {
xi <- x[i]
yi <- y[i]
if (abs(xi - yi) > 1) {
d <- d + (symb[max(xi, yi)] - symb[min(xi, yi) +
1])^2
}
}
sqrt((n/w) * d)
}
<environment: namespace:TSclust>
As can be seen above, there is another function called SAX.breakpoints.table
that has been re-called.
I need to know the exact definition of this function (i.e. SAX.breakpoints.table
). I tried SAX.breakpoints.table
> SAX.breakpoints.table
Error: object 'SAX.breakpoints.table' not found
as well as:
> ls("package:TSclust")
[1] "cluster.evaluation" "convert.to.SAX.symbol" "diss" "diss.ACF"
[5] "diss.AR.LPC.CEPS" "diss.AR.MAH" "diss.AR.PIC" "diss.CDM"
[9] "diss.CID" "diss.COR" "diss.CORT" "diss.DTWARP"
[13] "diss.DWT" "diss.EUCL" "diss.FRECHET" "diss.INT.PER"
[17] "diss.MINDIST.SAX" "diss.NCD" "diss.PACF" "diss.PDC"
[21] "diss.PER" "diss.PRED" "diss.SPEC.GLK" "diss.SPEC.ISD"
[25] "diss.SPEC.LLR" "loo1nn.cv" "MINDIST.SAX" "PAA"
[29] "pvalues.clust"
But I couldn't find it!