Package nltk_lite :: Package cluster :: Class VectorSpace
[show private | hide private]
[frames | no frames]

Class VectorSpace

ClusterI --+
           |
          VectorSpace

Known Subclasses:
EM, GroupAverageAgglomerative, KMeans

Abstract clusterer which takes tokens and maps them into a vector space. Optionally performs singular value decomposition to reduce the dimensionality.
Method Summary
  __init__(self, normalise, svd_dimensions)
  classify(self, vector)
  classify_vectorspace(self, vector)
Returns the index of the appropriate cluster for the vector.
  cluster(self, vectors, assign_clusters)
Assigns the vectors to clusters, learning the clustering parameters from the data.
  cluster_vectorspace(self, vectors, trace)
Finds the clusters using the given set of vectors.
  likelihood(self, vector, label)
Returns the likelihood (a float) of the token having the corresponding cluster.
  likelihood_vectorspace(self, vector, cluster)
Returns the likelihood of the vector belonging to the cluster.
  vector(self, vector)
Returns the vector after normalisation and dimensionality reduction
Inherited from ClusterI: classification_probdist, cluster_name, cluster_names, num_clusters

Method Details

__init__(self, normalise=False, svd_dimensions=None)
(Constructor)

Parameters:
normalise - should vectors be normalised to length 1
           (type=boolean)
svd_dimensions - number of dimensions to use in reducing vector dimensionsionality with SVD
           (type=int)

classify_vectorspace(self, vector)

Returns the index of the appropriate cluster for the vector.

cluster(self, vectors, assign_clusters=False, trace=False)

Assigns the vectors to clusters, learning the clustering parameters from the data. Returns a cluster identifier for each vector.
Overrides:
nltk_lite.cluster.ClusterI.cluster (inherited documentation)

cluster_vectorspace(self, vectors, trace)

Finds the clusters using the given set of vectors.

likelihood(self, vector, label)

Returns the likelihood (a float) of the token having the corresponding cluster.
Overrides:
nltk_lite.cluster.ClusterI.likelihood (inherited documentation)

likelihood_vectorspace(self, vector, cluster)

Returns the likelihood of the vector belonging to the cluster.

vector(self, vector)

Returns the vector after normalisation and dimensionality reduction

Generated by Epydoc 2.1 on Tue Sep 5 09:37:21 2006 http://epydoc.sf.net