fix instability in k-means test
minibatch k-means clustering