Package nltk_lite :: Package cluster :: Module em
[hide private]
[frames] | no frames]

Module em

source code

Classes [hide private]
  EM
The Gaussian EM clusterer models the vectors as being produced by a mixture of k Gaussian sources.
Functions [hide private]
 
euclidean_distance(u, v)
Returns the euclidean distance between vectors u and v.
source code
 
cosine_distance(u, v)
Returns the cosine of the angle between vectors v and u.
source code
 
demo()
Non-interactive demonstration of the clusterers with simple 2-D data.
source code
Function Details [hide private]

euclidean_distance(u, v)

source code 

Returns the euclidean distance between vectors u and v. This is equivalent to the length of the vector (u - v).

cosine_distance(u, v)

source code 

Returns the cosine of the angle between vectors v and u. This is equal to u.v / |u||v|.