fixed bug in computing mean in do_xval_knn.