|
__init__(self,
K,
init=' random ' ,
repeat=10,
max_iter=100,
eps=5e-08)
x.__init__(...) initializes x; see help(type(x)) for signature |
source code
|
|
|
run(self,
X)
Runs the K-means clustering algorithm on the given data matrix. |
source code
|
|
|
|
|
_closest_centers(self,
X,
mus,
K)
Given a set of points and a set of centres, compute the closest
centre to each point. |
source code
|
|
|
_new_centers(self,
X,
closest,
K)
Given a set of points, X, and their previously closest centre,
encoded in closest, computes their new centres. |
source code
|
|
|
_wcss(self,
X,
mus,
closest,
K)
Within-cluster sum of squares loss function. |
source code
|
|
Inherited from bases.BaseAlgorithm :
get_params ,
set_params
Inherited from object :
__delattr__ ,
__format__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__repr__ ,
__setattr__ ,
__sizeof__ ,
__str__ ,
__subclasshook__
|