public interface VectorSimilarity
Modifier and Type | Method and Description |
---|---|
double |
getMaxValue() |
double |
getMinValue() |
SRResultList |
mostSimilar(gnu.trove.map.TIntFloatMap query,
int maxResults,
gnu.trove.set.TIntSet validIds)
Returns the most similar items for a particular vector.
|
void |
setMatrices(org.wikibrain.matrix.SparseMatrix features,
org.wikibrain.matrix.SparseMatrix transpose,
File dataDir)
Sets the matrix capturing features and transposes.
|
double |
similarity(org.wikibrain.matrix.MatrixRow vector1,
org.wikibrain.matrix.MatrixRow vector2)
Returns the similarity of the two vectors.
|
double |
similarity(gnu.trove.map.TIntFloatMap vector1,
gnu.trove.map.TIntFloatMap vector2)
Computes the similarity between the two vectors.
|
void setMatrices(org.wikibrain.matrix.SparseMatrix features, org.wikibrain.matrix.SparseMatrix transpose, File dataDir) throws IOException
features
- transpose
- dataDir
- IOException
double similarity(org.wikibrain.matrix.MatrixRow vector1, org.wikibrain.matrix.MatrixRow vector2)
vector1
- vector2
- double similarity(gnu.trove.map.TIntFloatMap vector1, gnu.trove.map.TIntFloatMap vector2)
vector1
- vector2
- SRResultList mostSimilar(gnu.trove.map.TIntFloatMap query, int maxResults, gnu.trove.set.TIntSet validIds) throws IOException
query
- maxResults
- validIds
- IOException
double getMinValue()
double getMaxValue()
Copyright © 2014. All rights reserved.