Skip to content

AreaUnderCurve works with non binary labels but should probably print a warning for the user #62

@camilodlt

Description

@camilodlt

The documentations correctly says that the AreaUnderCurve will calculate the auc metric for the binary case : It is expected that ŷ be a vector of distributions over the binary set of unique elements of y.

However, the function can still work with more than 2 categoricals levels. Looking at the code, the positive class is always assumed to be the last one positive_class = CategoricalArrays.levels(first(ŷ))|> last. So, when passing labels UnivariateFinite{Multiclass{N}}, with N > 2, the value returned is the AUC for the N vs all other labels.

This is not a bug as the code is doing what the documentation says it will, but I'm wondering if the way in which it silently works (but wrong) on the multi class case can be improved (maybe with a warning, or an assertion error?)

Ideally, StatisticalMeasures could implement the macro auc for that case, which is the average of individual AUC scores.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions