def test_kmeans():
 X = np.random.random(size=(100, 10))
 Y = np.random.randint(5, size=(100, 1))
 dataset = DenseDesignMatrix(X, y=Y)
 model = KMeans(k=5, nvis=10)
 train = Train(model=model, dataset=dataset)
 train.main_loop()

def test_kmeans ( ) : X = np . random . random ( size = ( 100 , 10 ) ) Y = np . random . randint ( 5 , size = ( 100 , 1 ) ) dataset = DenseDesignMatrix ( X , y = Y ) model = KMeans ( k = 5 , nvis = 10 ) train = Train ( model = model , dataset = dataset ) train . main_loop ( )
tests kmeans .