def _make_kfold(self, Y): if self.MyKfold is not None: return self.MyKfold else: return StratifiedKFold(Y, self.n_folds)