train_dataset = DiskDataset.merge(filter(lambda x: x is not None, [train_ds_base, cv_dataset]))
train_datasets.append(train_dataset)
train_ds_base = DiskDataset.merge(filter(lambda x: x is not None, [train_ds_base, cv_dataset]))
cv_datasets.append(cv_dataset)
return list(zip(train_datasets, cv_datasets))
def train_valid_test_split(self,
After Change
// Note starts as 1/k since fold starts at 0. Ends at 1 since fold goes up
// to k-1.
frac_fold = 1. / (k - fold)
train_dir, cv_dir = directories[2 * fold], directories[2 * fold + 1]
fold_inds, rem_inds, _ = self.split(
rem_dataset,
frac_train=frac_fold,
frac_valid=1 - frac_fold,