public class LinkKMean extends AbstractClustering
Link-based K-Means Clustering Algorithm
The Link-based K-Means also incorporates pairwise object relationships into the clustering in addition to tradidtional local features such as terms
Copyright: Copyright (c) 2005
Company: IST, Drexel University
clusterNum, clusterSet, featureFilter, indexReader, randomSeed, showProgress| Constructor and Description |
|---|
LinkKMean(Clustering initClustering,
SparseMatrix links)
The constructor with symmetric pairwise object relationship matrix, i.e.
|
LinkKMean(Clustering initClustering,
SparseMatrix outLinks,
SparseMatrix inLinks)
The constructor with asymmetric pairwise object relationship matrix, i.e.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
cluster(IRDoc[] arrDoc)
Cluster given testing documents to the given number of clusters
|
protected DoubleDenseMatrix |
estimateClassTransferProb(IRDoc[] arrDoc,
int[] arrDocLabel) |
protected double |
getLogLikelihood(IRDoc doc,
int clusterID,
DoubleDenseMatrix transMatrix,
double[] arrOutLinks,
double[] arrInLinks) |
int |
getMaxIteration() |
boolean |
getUseWeight() |
protected boolean |
initialize(IRDoc[] arrDoc) |
void |
setMaxIteration(int iteration) |
void |
setUseWeight(boolean useWeight) |
cluster, getCluster, getClusterNum, getClusterSet, getFeatureFilter, getIndexReader, getRandomSeed, setFeatureFilter, setRandomSeed, setShowProgresspublic LinkKMean(Clustering initClustering, SparseMatrix links)
initClustering - the clustering method for initializationlinks - pairwise object relationship matrix. The matrix should be symmetric.public LinkKMean(Clustering initClustering, SparseMatrix outLinks, SparseMatrix inLinks)
initClustering - the clustering method for initializationoutLinks - pairwise object relationship matrix. Each row in this matrix stands for the linkages from the corressponding
object to other objects.inLinks - pairwise object relationship matrix. It is the transposed matrix of the out link matrix. Each row in this
matrix stands for the linkages from other objects to the object the row corresponds to.public void setUseWeight(boolean useWeight)
public boolean getUseWeight()
protected boolean initialize(IRDoc[] arrDoc)
public boolean cluster(IRDoc[] arrDoc)
ClusteringarrDoc - the document set for clusteringpublic int getMaxIteration()
public void setMaxIteration(int iteration)
protected double getLogLikelihood(IRDoc doc, int clusterID, DoubleDenseMatrix transMatrix, double[] arrOutLinks, double[] arrInLinks)
protected DoubleDenseMatrix estimateClassTransferProb(IRDoc[] arrDoc, int[] arrDocLabel)
Copyright © 2018 JULIE Lab, Germany. All rights reserved.