scikit-learn auc with decreasing uint8 coordinates: use a triangle to check direction
Changing the numeric representation of the same curve should preserve its area.
scikit-learn auc with decreasing uint8 coordinates: use a triangle to check direction
A small triangle provides a useful independent reference for AUC validation because its area can be established before comparing libraries. Decreasing coordinates represented with an unsigned type deserve a separate check of whether differences retain their intended direction. A simple geometric fixture keeps that question visible. [1, 2, 3]
Scope of the source report
A public scikit-learn report says that decreasing uint8 coordinates passed directly to metrics.auc produce wrapped positive differences, affecting area and monotonicity checks. It supplies floating-input and reversed-order comparisons. The report distinguishes this direct auc case from evidence of a general roc_auc_score problem. [1]
What to inspect in the input
Prepare signed, float, and reversed representations of the same triangle and compare their areas. Check monotonicity separately in the original coordinate order, including rejection of a nonmonotonic curve. Sorting input merely to hide an error can test a different curve from the intended one. [1, 3]
A small acceptance example
The points (2,0), (1,1), and (0,0) form a triangle with base 2 and height 1, so its area is 1. A uint8 path returning 255 for that shape fails this reference. The independent basis is geometry rather than another execution result, and it does not automatically apply to a task defined in a circular modular coordinate space. [1, 3]
The boundary passed to Truthound
Truthound Core's ColumnPairValidator can compare prepared computed_area and geometric_area columns. The operator defines coordinate semantics and the independent area reference; rejection of nonmonotonic input remains a separate check. This component exposes an area change associated with numeric representation, but it neither repairs auc nor guarantees every ROC metric. [1, 2, 3]
Application conditions
Preserve original coordinate order and numeric type, preparing the geometric reference area independently of the computed result.
Alternatives
Use a numeric type suitable for coordinate differences and check monotonicity in the original order.
Limitations
This direct auc case must not be generalized into a defect affecting every ROC metric.
Evidence
- Event checked
- Subject checked
- Modified
