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

"set accuracy =1 on classes with no samples" *may* not be correct #31

Open
raffaello-camoriano opened this issue Nov 24, 2017 · 0 comments

Comments

@raffaello-camoriano
Copy link
Member

raffaello-camoriano commented Nov 24, 2017

I might be wrong, but this line doesn't seem to be setting the right elements of perClass to 1.

set(perClass+perClass_length, (T)1.0, totClasses-perClass_length);

I suggest to do:

        if (*den == 0.0)
        {
            // Set accuracy =1 on classes with no sampless
            perClass[i] = (T)1.0;
        }
        else
        {
            perClass[i] = ((T)(*num))/((*den) + std::numeric_limits<T>::epsilon());
        }
@raffaello-camoriano raffaello-camoriano self-assigned this Nov 24, 2017
@raffaello-camoriano raffaello-camoriano removed their assignment Jan 23, 2018
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