|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcc.mallet.cluster.Clustering
public class Clustering
| Field Summary | |
|---|---|
protected InstanceList |
instances
|
protected int[] |
labels
|
protected int |
numLabels
|
| Constructor Summary | |
|---|---|
Clustering(InstanceList instances,
int numLabels,
int[] labels)
Clustering constructor. |
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object o)
|
InstanceList |
getCluster(int label)
Return an list of instances with a particular label. |
InstanceList[] |
getClusters()
Returns an array of instance lists corresponding to clusters. |
int[] |
getIndicesWithLabel(int label)
|
InstanceList |
getInstances()
|
int |
getLabel(int index)
Get the cluster label for a particular instance. |
int[] |
getLabels()
|
int |
getNumClusters()
|
int |
getNumInstances()
|
void |
setLabel(int index,
int label)
Set the cluster label for a particular instance. |
void |
setNumLabels(int n)
Set the number of clusters |
Clustering |
shallowCopy()
|
int |
size(int label)
|
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected int numLabels
protected int[] labels
protected InstanceList instances
| Constructor Detail |
|---|
public Clustering(InstanceList instances,
int numLabels,
int[] labels)
instances - Instances that are clusterednumLabels - Number of clusterslabels - Assignment of instances to clusters; many-to-one with
range [0,numLabels).| Method Detail |
|---|
public InstanceList getInstances()
public InstanceList getCluster(int label)
public InstanceList[] getClusters()
public int getLabel(int index)
public int[] getLabels()
public int getNumClusters()
public int getNumInstances()
public int size(int label)
public int[] getIndicesWithLabel(int label)
public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic Clustering shallowCopy()
public void setLabel(int index,
int label)
public void setNumLabels(int n)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||