powered by
Vectorize matrix slices over a specific way of an three-way array, and conduct kmeans on it.
kmeans
akmeans(data, centers, margin = 3L, ndim = NULL, ...)
Three-way data array
Passed to kmeans
Integer indicating which way to cluster over
The rank of the low dimensional approximation of the matrix slices to construct before clustering (using svd)
svd
Additional arguments passed to kmeans
# NOT RUN { set.seed(1) res <- akmeans(data = carray(dcars), margin = 3L, centers = 5, nstart = 10) # }
Run the code above in your browser using DataLab