generate cross validation set for trainHistory