Split generator for cross validation and holdout (function for holdout is newly added)