Hi Pradhuman,
All of the clustering algorithms use our vector implementation, and the
actual class used (Sparse or Dense) should depend upon the encoding
format used. If you write a preprocessor job to get your input vectors
in the right format before running a clustering job on them I suggest
using the SparseVector implementation. It will serialize itself in a
manner similar to your example (though I'd expect to see just '[sM, '
where M is the cardinality of the vector).
Jeff
Pradhuman Jhala wrote:
Hi,
I am looking for documentation on the input format, particularly, the sparse matrix format, supported by various supervised & unsupervised algorithms available in Mahout. It looks like 'sparse matrix format' is supported, but I am not able to find details of it.
While looking at the way kmean clustering uses org.apache.mahout.matrix package, it seems, it expects data in the
"[sM+2, index_1:value_1, index_2:value_2, ...., index_M:value_M, ] format, for it be considered as 'sparse'. Just wondering if this is correct and consistant across all clutering algorithms.
thanks.
Pradhuman