|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object cc.mallet.cluster.util.ClusterUtils
public class ClusterUtils
Utility functions for Clusterings.
Clustering
Constructor Summary | |
---|---|
ClusterUtils()
|
Method Summary | |
---|---|
static InstanceList |
combineLists(InstanceList li,
InstanceList lj)
|
static Clustering |
copyAndMergeClusters(Clustering clustering,
int i,
int j)
|
static Clustering |
copyAndMergeInstances(Clustering clustering,
int[] instances)
|
static Clustering |
copyAndMergeInstances(Clustering clustering,
int i,
int j)
|
static Clustering |
copyWithNewLabels(Clustering clustering)
|
static Clustering |
createRandomClustering(InstanceList instances,
Randoms random)
|
static Clustering |
createSingletonClustering(InstanceList instances)
Initializes Clustering to one Instance per cluster. |
static int[] |
getCombinedInstances(Clustering clustering,
int i,
int j)
|
static InstanceList |
makeList(Instance i,
Instance j)
|
static Clustering |
mergeClusters(Clustering clustering,
int labeli,
int labelj)
Relabels the clustering to reflect merging clusters i and j. |
static Clustering |
mergeInstances(Clustering clustering,
int[] instances)
Merge clusters containing the specified instances. |
static Clustering |
mergeInstances(Clustering clustering,
int i,
int j)
|
static Clustering |
mergeInstancesWithSameLabel(Clustering clustering)
|
static Clustering |
shatterInstances(Clustering clustering,
int[] indices)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ClusterUtils()
Method Detail |
---|
public static InstanceList combineLists(InstanceList li, InstanceList lj)
li
- lj
-
InstanceList
where lj
is appended to li
.public static Clustering mergeClusters(Clustering clustering, int labeli, int labelj)
clustering
- i
- j
-
public static Clustering mergeInstances(Clustering clustering, int[] instances)
clustering
- instances
-
public static int[] getCombinedInstances(Clustering clustering, int i, int j)
public static Clustering mergeInstances(Clustering clustering, int i, int j)
public static Clustering createSingletonClustering(InstanceList instances)
instances
-
public static Clustering createRandomClustering(InstanceList instances, Randoms random)
public static Clustering shatterInstances(Clustering clustering, int[] indices)
clustering
- indices
-
indices
are in the same cluster.public static InstanceList makeList(Instance i, Instance j)
i
- j
-
InstanceList
containing the two argument Instance
s.public static Clustering copyWithNewLabels(Clustering clustering)
clustering
-
public static Clustering mergeInstancesWithSameLabel(Clustering clustering)
public static Clustering copyAndMergeClusters(Clustering clustering, int i, int j)
clustering
- i
- j
-
clustering
in which clusters
with labels i
and j
have been merged.public static Clustering copyAndMergeInstances(Clustering clustering, int i, int j)
clustering
- i
- j
-
clustering
in which Instance
s i
and j
have been put in the
same cluster.public static Clustering copyAndMergeInstances(Clustering clustering, int[] instances)
clustering
- instances
-
clustering
in which the
clusters containing the specified Instance
s have been
merged together into one cluster.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |