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

fix: percentage fix #206

Merged
merged 1 commit into from
Dec 9, 2024
Merged

fix: percentage fix #206

merged 1 commit into from
Dec 9, 2024

Conversation

rivamarco
Copy link
Member

Fixed percentages that went above 100% or were wrong

flagged_metrics / len(model_quality_reference)
)
perc_model_quality["value"] = 1 - (
flagged_metrics / len(model_quality_current["grouped_metrics"])
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the percentage is the number of "wrong" (flagged) metrics / the number of metrics that we have considered

)
cumulative_sum += 1 - (
flagged_metrics
/ len(model_quality_reference["class_metrics"][0]["metrics"])
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For each class, we have the number of "wrong"/flagged metrics divided by the numer of the metrics, and we put this in an accumulator

)
flagged_metrics = 0
perc_model_quality["value"] = (
cumulative_sum / len(model_quality_reference["classes"])
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then the accumulator is divided by the number of classes

@rivamarco rivamarco merged commit 523d197 into main Dec 9, 2024
5 checks passed
@rivamarco rivamarco deleted the fix/fix-percentages branch December 9, 2024 16:42
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

Successfully merging this pull request may close these issues.

4 participants