class documentation

Interface covering basic clustering functionality.

Method classification_probdist Classifies the token into a cluster, returning a probability distribution over the cluster identifiers.
Method classify Classifies the token into a cluster, setting the token's CLUSTER parameter to that cluster identifier.
Method cluster Assigns the vectors to clusters, learning the clustering parameters from the data. Returns a cluster identifier for each vector.
Method cluster_name Returns the names of the cluster at index.
Method cluster_names Returns the names of the clusters. :rtype: list
Method likelihood Returns the likelihood (a float) of the token having the corresponding cluster.
Method num_clusters Returns the number of clusters.
def classification_probdist(self, vector): (source)

Classifies the token into a cluster, returning a probability distribution over the cluster identifiers.

@abstractmethod
def classify(self, token): (source)

Classifies the token into a cluster, setting the token's CLUSTER parameter to that cluster identifier.

@abstractmethod
def cluster(self, vectors, assign_clusters=False): (source)

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

def cluster_name(self, index): (source)

Returns the names of the cluster at index.

def cluster_names(self): (source)

Returns the names of the clusters. :rtype: list

def likelihood(self, vector, label): (source)

Returns the likelihood (a float) of the token having the corresponding cluster.

@abstractmethod
def num_clusters(self): (source)