Class Index | File Index

Classes


Class de.aitools.js.CosineSimilarity

Implementation of CosineSimilarity
Defined in: RetrievalModel.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Implementation of CosineSimilarity as relevance function (rho) to be used in a retrieval model
Method Summary
Method Attributes Method Name and Description
<static>  
de.aitools.js.CosineSimilarity.computeRelevance(vector1, vector2)
Computes the cosine similarity for the given two vectors and returns it as number value between 1 (high similarity) and 0 (no similarity).
Class Detail
de.aitools.js.CosineSimilarity()
Implementation of CosineSimilarity as relevance function (rho) to be used in a retrieval model
Author: Christof Braeutigam christof.braeutigam@uni-weimar.de.
See:
de.aitools.js.RetrievalModel
Method Detail
<static> {number} de.aitools.js.CosineSimilarity.computeRelevance(vector1, vector2)
Computes the cosine similarity for the given two vectors and returns it as number value between 1 (high similarity) and 0 (no similarity). The cosinus similarity is computed by normalizing the given vectors and compute their scalar product. Note that the given vectors will be modified (normalized) if they are not already normalized.
Parameters:
{de.aitools.js.Vector} vector1
first vector
{de.aitools.js.Vector} vector2
second vector
Returns:
{number} cosinus similarity value

Documentation generated by JsDoc Toolkit 2.4.0 on Wed May 30 2012 16:21:04 GMT+0200 (CEST)