comirva.web.text.similarity
Class SimMeasure
java.lang.Object
comirva.web.text.similarity.SimMeasure
- Direct Known Subclasses:
- SimMeasure_CosineSim, SimMeasure_DiceCoefficient, SimMeasure_Euclidean, SimMeasure_InnerProduct, SimMeasure_JaccardCoefficient, SimMeasure_JeffreyDist, SimMeasure_OverlapSim, SimMeasure_OverlapSimWhitman
public abstract class SimMeasure
- extends Object
Method Summary |
String |
getName()
|
protected abstract float |
getSimilarity_intern(float[] a,
float[] b)
return the computed similarity (or distance, respectively) between the two
vectors. |
float |
getSimilarity(float[] a,
float[] b)
|
SimMeasure.SimType |
getType()
Indicates if this similarity measure returns similarities by means of
similarities, or by means of distances. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SimMeasure
protected SimMeasure(SimMeasure.SimType type,
NormFunc normFunc)
getSimilarity_intern
protected abstract float getSimilarity_intern(float[] a,
float[] b)
throws SizeMismatchException
- return the computed similarity (or distance, respectively) between the two
vectors. Which of distance or similarity is computed by this measure can
be queried by calling getType().
- Parameters:
a
- vector representing the first artistb
- vector representing the second artist
- Returns:
-
- Throws:
SizeMismatchException
getType
public SimMeasure.SimType getType()
- Indicates if this similarity measure returns similarities by means of
similarities, or by means of distances.
- Returns:
getName
public String getName()
getSimilarity
public float getSimilarity(float[] a,
float[] b)
throws SizeMismatchException
- Throws:
SizeMismatchException