Package nltk :: Package cluster :: Module api :: Class ClusterI
[hide private]
[frames] | no frames]

Class ClusterI

source code

Known Subclasses:

Interface covering basic clustering functionality.

Instance Methods [hide private]
 
cluster(self, vectors, assign_clusters=False)
Assigns the vectors to clusters, learning the clustering parameters from the data.
source code
 
classify(self, token)
Classifies the token into a cluster, setting the token's CLUSTER parameter to that cluster identifier.
source code
 
likelihood(self, vector, label)
Returns the likelihood (a float) of the token having the corresponding cluster.
source code
 
classification_probdist(self, vector)
Classifies the token into a cluster, returning a probability distribution over the cluster identifiers.
source code
 
num_clusters(self)
Returns the number of clusters.
source code
 
cluster_names(self)
Returns the names of the clusters.
source code
 
cluster_name(self, index)
Returns the names of the cluster at index.
source code
Method Details [hide private]

cluster(self, vectors, assign_clusters=False)

source code 

Assigns the vectors to clusters, learning the clustering parameters from the data. Returns a cluster identifier for each vector.