|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.uci.ics.jung.algorithms.cluster.VoltageClusterer
public class VoltageClusterer
Clusters vertices of a Graph
based on their ranks as
calculated by VoltageRanker
. This algorithm is based on,
but not identical with, the method described in the paper below.
The primary difference is that Wu and Huberman assume a priori that the clusters
are of approximately the same size, and therefore use a more complex
method than k-means (which is used here) for determining cluster
membership based on co-occurrence data.
The algorithm proceeds as follows:
NOTE: Depending on how the co-occurrence data splits the data into clusters, the number of clusters returned by this algorithm may be less than the number of clusters requested. The number of clusters will never be more than the number requested, however.
VoltageRanker
,
KMeansClusterer
Field Summary | |
---|---|
protected KMeansClusterer |
kmc
|
protected int |
num_candidates
|
protected RandomEngine |
rand
|
static String |
VOLTAGE_KEY
|
protected VoltageRanker |
vr
|
protected UserDatumNumberVertexValue |
vv
|
Constructor Summary | |
---|---|
VoltageClusterer(int num_candidates,
int rank_iterations,
double rank_convergence,
int cluster_iterations,
double cluster_convergence)
Creates an instance of a VoltageCluster with the specified parameters. |
Method Summary | |
---|---|
void |
clear(ArchetypeGraph g)
Clears the voltage decoration values from the vertices of g . |
protected Collection |
cluster_internal(ArchetypeGraph g,
ArchetypeVertex origin,
int num_clusters)
Does the work of getCommunity and cluster . |
Collection |
cluster(ArchetypeGraph g,
int num_clusters)
Clusters the vertices of g into
num_clusters clusters, based on their connectivity. |
Collection |
getCommunity(ArchetypeVertex v)
Returns a community (cluster) centered around v . |
protected Map |
getObjectCounts(Collection candidates,
Object seed)
|
protected Object |
getRandomElement(Collection c)
|
protected Object[] |
getSeedCandidates(Collection candidates)
Returns an array of cluster seeds, ranked in decreasing order of number of appearances in the specified collection of candidate clusters. |
protected void |
setRandomSeed(int random_seed)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String VOLTAGE_KEY
protected int num_candidates
protected KMeansClusterer kmc
protected UserDatumNumberVertexValue vv
protected VoltageRanker vr
protected RandomEngine rand
Constructor Detail |
---|
public VoltageClusterer(int num_candidates, int rank_iterations, double rank_convergence, int cluster_iterations, double cluster_convergence)
num_candidates
- the number of candidate clusters to createrank_iterations
- the number of iterations to run VoltageRankercluster_iterations
- the number of iterations to run KMeansClusterercluster_convergence
- the convergence value for KMeansClustererMethod Detail |
---|
protected void setRandomSeed(int random_seed)
public Collection getCommunity(ArchetypeVertex v)
v
.
v
- the vertex whose community we wish to discoverpublic Collection cluster(ArchetypeGraph g, int num_clusters)
g
into
num_clusters
clusters, based on their connectivity.
g
- the graph whose vertices are to be clusterednum_clusters
- the number of clusters to identifypublic void clear(ArchetypeGraph g)
g
.
protected Collection cluster_internal(ArchetypeGraph g, ArchetypeVertex origin, int num_clusters)
getCommunity
and cluster
.
g
- the graph whose vertices we're clusteringorigin
- the center (if one exists) of the graph to clusternum_clusters
- protected Object getRandomElement(Collection c)
protected Object[] getSeedCandidates(Collection candidates)
candidates
- protected Map getObjectCounts(Collection candidates, Object seed)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |