def get_num_subjects(fnames):
    """
    Given the list of filenames(training/testing) it returns the list of subjects to which these files point
    :param fnames: list of filenames
    :return:list of assosciated subjects
    """
    fnames = [f.split("_")[1] for f in fnames]
    subjects = list(set([int(f.strip("S")) for f in fnames]))
    return subjects