public class CosineSimilarity extends Object implements SimilarityFunction
CosineSimilarity()
double
distance(Map<String,Double> vector1, Map<String,Double> vector2)
static double
dotProduct(Map<String,Double> vector1, Map<String,Double> vector2)
magnitude(Map<String,Double> vector)
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public CosineSimilarity()
public double distance(Map<String,Double> vector1, Map<String,Double> vector2)
distance
SimilarityFunction
public static double dotProduct(Map<String,Double> vector1, Map<String,Double> vector2)
public static double magnitude(Map<String,Double> vector)
Copyright © 2014. All rights reserved.