Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

evaluated_length_seconds, evaluated_files variables in SegmentBasedMetrics and EventBasedMetics classes are not initialized to 0 when running reset() function. #20

Open
tjddn0402 opened this issue Aug 24, 2022 · 0 comments

Comments

@tjddn0402
Copy link

tjddn0402 commented Aug 24, 2022

The reset() function initializes all internal states.
So isn't it natural to set these variables be zero, too?

in SegmentBasedMetrics class,

def reset(self):
    """Reset internal state
    """
    self.evaluated_length_seconds = 0
    self.evaluated_files = 0

    self.overall = {
        'Ntp': 0.0,
        'Ntn': 0.0,
        'Nfp': 0.0,
        'Nfn': 0.0,
        'Nref': 0.0,
        'Nsys': 0.0,
        'ER': 0.0,
        'S': 0.0,
        'D': 0.0,
        'I': 0.0,
    }

    self.class_wise = {}
    for class_label in self.event_label_list:
        self.class_wise[class_label] = {
            'Ntp': 0.0,
            'Ntn': 0.0,
            'Nfp': 0.0,
            'Nfn': 0.0,
            'Nref': 0.0,
            'Nsys': 0.0,
        }

    return self

Thank you for your hard work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant