|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--edu.stanford.nlp.cluster.SimilarityMatrix
Variables and methods for constructing a matrix of similarities of a data collection. The client must provide the Similarity metric.
Field Summary | |
protected ArrayListMatrix |
similarities
|
Constructor Summary | |
SimilarityMatrix(Clusters c)
Creates new SimilarityMatrix with default Cosine Similarity |
|
SimilarityMatrix(Matrix m)
Creates new SimilarityMatrix with default Cosine Similarity |
|
SimilarityMatrix(Similarity s,
Clusters c)
Creates new SimilarityMatrix with Similarity Metric defined by client |
|
SimilarityMatrix(Similarity s,
Matrix m)
Creates new SimilarityMatrix with Similarity Metric defined by client |
Method Summary | |
Matrix |
createSimilarityMatrix(Similarity s,
Clusters c)
create a full dense matrix of similarities, where similarities(i,j) gives the similarity between the probability distribution over data of clusters i and j of Clusters c as determined by the similarity metric s |
Matrix |
createSimilarityMatrix(Similarity s,
Matrix m)
create a full dense matrix of similarities, where similarities(i,j) gives the similarity between columns i and j of Matrix m as determined by the similarity metric s |
Matrix |
getMatrix()
Returns underlying Matrix |
void |
initialize(int size)
initializes similarities matrix to be a m x m square matrix, where m=size
the matrix is of type ArrayListMatrix, the columns of which are of type GrowableDenseDoubleArray |
void |
merge(int i,
int j,
Double4Function csf,
Clusters clusters)
Merges columns i,j in the similarity matrix by setting the value at each entry k in the column to be csf.apply(i(k),j(k)). |
void |
merge(int i,
int j,
cern.colt.function.DoubleDoubleFunction csf)
Merges columns i,j in the similarity matrix by setting the value at each entry k in the column to be csf.apply(i(k),j(k)). |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected ArrayListMatrix similarities
Constructor Detail |
public SimilarityMatrix(Similarity s, Matrix m)
public SimilarityMatrix(Similarity s, Clusters c)
public SimilarityMatrix(Matrix m)
public SimilarityMatrix(Clusters c)
Method Detail |
public void initialize(int size)
similarities
matrix to be a m x m square matrix, where m=size
the matrix is of type ArrayListMatrix, the columns of which are of type GrowableDenseDoubleArray
public Matrix createSimilarityMatrix(Similarity s, Matrix m)
public Matrix createSimilarityMatrix(Similarity s, Clusters c)
public Matrix getMatrix()
MatrixWrapper
getMatrix
in interface MatrixWrapper
public void merge(int i, int j, cern.colt.function.DoubleDoubleFunction csf)
public void merge(int i, int j, Double4Function csf, Clusters clusters)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |