-
Notifications
You must be signed in to change notification settings - Fork 118
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sparse matrices fail #17
Comments
BTW, I'm on julia HEAD: JuliaLang/julia@244cffc |
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?The text was updated successfully, but these errors were encountered: