Added subsample and cross validation dataset generation