Skip to content

Bug in dataset splits? #6

@puhsu

Description

@puhsu

I'm reading the dataset code and there is probably a bug here:

self.__splits = (split_training, split_validation, split_test)
# Sort dataset according to splits.
self.__data = np.concatenate((
self.__data[split_training], self.__data[split_validation], self.__data[split_test]
), axis=0)

After that, you are using the old indices to index into the shuffled/concatenated arrays. So the splits are different (not stratified, for example):

def split_train(self) -> torch.Tensor:
return self.__splits[0]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions