feat: expose metric unit and target in the metrics API (CLIM-1103) - #603
Open
edvinstava wants to merge 6 commits into
Open
edvinstava wants to merge 6 commits into
edvinstava wants to merge 6 commits into
Conversation
edvinstava
force-pushed
the
eas/feat/clim-1103-friendly-metric-descriptions
branch
from
September 15, 2026 12:49
07642b3 to
4344df0
Compare
edvinstava
marked this pull request as ready for review
September 15, 2026 12:59
Contributor
|
Coverage metrics are imo (fighing with Claude about this) better the higher up til the target where its flat. That should be the message when showing it in FE. Only too low scores get a bad color. Should be reflected in API docs. |
…ps://github.com/dhis2-chap/chap-core into eas/feat/clim-1103-friendly-metric-descriptions
… eas/feat/clim-1103-friendly-metric-descriptions
Contributor
|
I think the merge caused an error here with some preexisting work where Claude meant optimizing sensitivity and specificity was bad for HPO, but for info to user I think it should be ok, so reset these to the correct values @edvinstava |
…hem from HPO Sensitivity, specificity and outbreak accuracy lost optimization_direction so HPO could not select a degenerate model on them, but the field also feeds the metric catalogue the frontend colours scores by. Unsetting it left clients with no rule at all for three metrics where higher is plainly better to a reader. Restore MAXIMIZE on all three and move the HPO decision to its own valid_hpo_objective flag, which get_optimization_direction rejects on. Presentation and objective selection stop sharing one field.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds optional
unitandtargetmetadata to metric specs and exposes them on the metric catalogue endpoint, so the frontend can drop its hardcoded MAPE unit and coverage/bias targets.unitis a display suffix for the raw score (%for MAPE,periodsfor peak period lag). It does not rescale the score.targetis the ideal raw value for metrics where neither higher nor lower is better (0.8for coverage 10-90,0.5for coverage 25-75 and ratio above truth,0.0for the peak metrics).optimization_direction=Nonesets atargetinstead, and a score closer to it is better. Documented on the API field and in the contributor guide.Companion to frontend #255, which still needs to consume the new fields.