org.apache.spark.examples.mllib
Compute the similar columns of a matrix, using cosine similarity.
The input matrix must be stored in row-oriented dense format, one line per row with its entries separated by space. For example,
0.5 1.0 2.0 3.0 4.0 5.0
represents a 3-by-2 matrix, whose first row is (0.5, 1.0).
Example invocation:
bin/run-example mllib.CosineSimilarity \ --threshold 0.1 data/mllib/sample_svm_data.txt
Compute the similar columns of a matrix, using cosine similarity.
The input matrix must be stored in row-oriented dense format, one line per row with its entries separated by space. For example,
represents a 3-by-2 matrix, whose first row is (0.5, 1.0).
Example invocation:
bin/run-example mllib.CosineSimilarity \ --threshold 0.1 data/mllib/sample_svm_data.txt