public class Cosine extends SetBasedStringSimilarity
k
Constructor and Description |
---|
Cosine() |
Cosine(int k)
Implements Cosine Similarity.
|
Modifier and Type | Method and Description |
---|---|
protected static double |
dotProduct(int[] profile1,
int[] profile2) |
static void |
main(String[] args) |
protected static double |
norm(int[] profile)
Compute the norm L2 : sqrt(Sum_i( v_i^2))
|
double |
similarity(int[] profile1,
int[] profile2) |
distance, similarity
public Cosine(int k)
k
- public Cosine()
public static void main(String[] args)
args
- the command line argumentspublic double similarity(int[] profile1, int[] profile2)
similarity
in class SetBasedStringSimilarity
protected static double norm(int[] profile)
profile
- protected static double dotProduct(int[] profile1, int[] profile2)
Copyright © 2015. All rights reserved.