|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.aitools.ir.retrievalmodels.relevance.algebraic.CosineSimilarity
public class CosineSimilarity
This class computes the cosine similarity between two vector representations.
Constructor Summary | |
---|---|
CosineSimilarity()
|
Method Summary | |
---|---|
double |
compute(Vector v1,
Vector v2)
Computes and returns the cosine similarity between two vectors. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CosineSimilarity()
Method Detail |
---|
public double compute(Vector v1, Vector v2)
compute
in interface RelevanceFunction<Vector,Vector>
v1
- the left hand side vector.v2
- the right hand side vector.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |