def growing_sequential_kfold(dataset, k):
    """ Builds `k` growing validations triplets.

    Parameters
    ----------
    dataset : Dataset
    k : int
        The number of triplets required as validations sets.

    Returns
    -------
    [[Dataset]]
        Returns a list of list of three datasets (training set, validation set, test set) where the length of the
        training set is growing for each further triplets.
    """
    if k < 2:
        raise ValueError("Parameter k has to be greater than 1.")
    folds = []

    for i in range(1, k + 1):
        proportions = [i, 1, 1, k - i]  # trainset, validset, testset, leftover
        folds.append(split_dataset(dataset, proportions)[:3])

    return folds
dataset/ETHPy150Open SMART-Lab/smartlearner/smartlearner/utils.py/growing_sequential_kfold/original