Abstract clusterer which takes tokens and maps them into a vector
space. Optionally performs singular value decomposition to reduce the
dimensionality.
|
|
|
cluster(self,
vectors,
assign_clusters=False,
trace=False)
Assigns the vectors to clusters, learning the clustering parameters
from the data. |
source code
|
|
|
cluster_vectorspace(self,
vectors,
trace)
Finds the clusters using the given set of vectors. |
source code
|
|
|
classify(self,
vector)
Classifies the token into a cluster, setting the token's CLUSTER
parameter to that cluster identifier. |
source code
|
|
|
classify_vectorspace(self,
vector)
Returns the index of the appropriate cluster for the vector. |
source code
|
|
|
likelihood(self,
vector,
label)
Returns the likelihood (a float) of the token having the
corresponding cluster. |
source code
|
|
|
likelihood_vectorspace(self,
vector,
cluster)
Returns the likelihood of the vector belonging to the cluster. |
source code
|
|
|
vector(self,
vector)
Returns the vector after normalisation and dimensionality reduction |
source code
|
|
|
_normalise(self,
vector)
Normalises the vector to unit length. |
source code
|
|
Inherited from api.ClusterI :
classification_probdist ,
cluster_name ,
cluster_names ,
num_clusters
|