Skip to content

Bug: Incorrect sample counting in getlen method of DataManager class #48

@wcxhimself

Description

@wcxhimself

The getlen method in the DataManager class incorrectly calculates the number of samples for a given class. Instead of counting the number of samples, it sums the indices of matching samples. It should be:

def getlen(self, index):
    y = self._train_targets
    return np.sum(y == index) 

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