Purpose
Make core mathematical APIs predictable, typed, and impossible to misunderstand.
Problems
frechet_upper may return either a scalar float or a tuple containing diagnostics.
- CC coefficient functions return loose dictionaries with mixed values.
comp.upper() widens typed Literals to plain str.
- Denominator-zero behavior differs across modules.
- ROC-style J and two-world J are both valid but not clearly separated everywhere.
Target
- Scalar functions return scalars.
- Diagnostic functions return typed result objects.
- Composition types are normalized centrally.
- CC undefined behavior is explicit.
- ROC J and two-world J are named separately.
Candidate Fixes
- Add
Comp, CompInput, and normalize_comp.
- Split
frechet_upper from diagnostic/uncertainty variants.
- Add
ComposabilityCoefficients dataclass or TypedDict.
- Add explicit
roc_youden_j and two_world_j.
- Decide legacy behavior for
metrics.cc_max.
Definition of Done
Child Issues
Purpose
Make core mathematical APIs predictable, typed, and impossible to misunderstand.
Problems
frechet_uppermay return either a scalarfloator a tuple containing diagnostics.comp.upper()widens typed Literals to plainstr.Target
Candidate Fixes
Comp,CompInput, andnormalize_comp.frechet_upperfrom diagnostic/uncertainty variants.ComposabilityCoefficientsdataclass or TypedDict.roc_youden_jandtwo_world_j.metrics.cc_max.Definition of Done
frechet_upper(...) -> floatis stableChild Issues