Esempio n. 1
0
 /**
  * Compares the specified row to all other rows, returning the k-nearest rows according to the
  * similarity metric.
  *
  * @param m The {@link Matrix} containing data points to be compared
  * @param row The current row in {@code m} to be compared against all other rows
  * @param kNearestRows The number of most similar rows to retain
  * @param similarityType The similarity method to use when comparing rows
  * @return a mapping from the similarity to the {@code kNearestRows} most similar rows
  */
 public SortedMultiMap<Double, Integer> getMostSimilar(
     Matrix m, int row, int kNearestRows, Similarity.SimType similarityType) {
   return getMostSimilar(m, row, kNearestRows, Similarity.getSimilarityFunction(similarityType));
 }