def filter_dataset(dataset, filter_indices):
    """
    Filter a dataset consisting of a dictionary for the different variables by a vector of True/False indicating if
    the data point (a row index) should be kept or not.
    Returning a copy to leave the original dataset untouched.
    """
    dataset_copy = dataset.copy()
    for key in dataset_copy.keys():
        dataset_copy[key] = dataset_copy[key][filter_indices, :]

    return dataset_copy