Train and test for k means