Skip to content

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

Description

@raffaello-camoriano

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());
        }

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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