Open swadey opened 10 years ago
BTW, I'm on julia HEAD: JuliaLang/julia@244cffc7d99b74fa2b7aab9efed812aeba7e4b38
The algorithm itself is only for dense matrices.
We may add a k-means algorithms for sparse matrices something in future. However, this is not very high in our priority list. A pull request may make this happen faster.
@lindahua is there an actual dependency on dense vectors or just that it produces dense centroids? I don't know what the implementation is doing, but if it's doing some kind of kd-tree/ball-tree for a nearest neighbor approximation, that would make sense.
The algorithm scans each element in a dense pattern when computing the mean & computing distances. The pairwise distance computing function only accepts dense matrices, as it relies on BLAS's gemm to compute distances in a very fast way.
It does not use kd-tree in any way, it just relies on BLAS to compute pairwise Euclidean distances.
I get this error when calling
kmeans
on a sparse matrix:Could this be due to the
StoredArray
change in julia?