Skip to content

add normalized_weighted averaging method to get_averaged_metric()#409

Open
JaisalJain wants to merge 2 commits intoJdeRobot:masterfrom
JaisalJain:fix/weighted-average-normalization
Open

add normalized_weighted averaging method to get_averaged_metric()#409
JaisalJain wants to merge 2 commits intoJdeRobot:masterfrom
JaisalJain:fix/weighted-average-normalization

Conversation

@JaisalJain
Copy link
Contributor

@JaisalJain JaisalJain commented Mar 6, 2026

Closes #406

As suggested by @dpascualhe, this PR adds normalized_weighted as a new averaging method rather than modifying the existing weighted behavior.

New method:
normalized_weighted divides by the sum of weights, ensuring the result stays within [0, 1].

Existing behavior unchanged:
weighted continues to return the raw dot product for backward compatibility.

Changes:

  • perceptionmetrics/utils/segmentation_metrics.py: added normalized_weighted method.

@JaisalJain JaisalJain force-pushed the fix/weighted-average-normalization branch from 0b3b1d8 to e9abcbb Compare March 9, 2026 15:37
@JaisalJain JaisalJain changed the title fixed weighted averaging in get_averaged_metric() add normalized_weighted averaging method to get_averaged_metric() Mar 10, 2026
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.

Fix: correct weighted averaging in get_averaged_metric()

1 participant