Skip to content

Area under the receiving operating characteristic curve (AUROC) calculation. #977

Open

Description

@stephenpardy

A common metric for classification model performance is the area under the receiving operating characteristic curve (AUROC, AUROCC, or often simply AUC) which shows the area of the curve created by plotting TPR and FPR against one another.
Wikipedia.

This metric is available in sklearn, but is currently missing from Dask-ml. One issue with computing this metric in Dask is that the standard implementation of AUROC requires searching over a sorted array and the sorting operations are often expensive in distributed computing.

I would be interested in a discussion of whether a naive version of this could be implemented using sorting and whether there are any known methods of computation that avoid the sort.

Activity

  1. TomAugspurger commented on Sep 24, 2023

    @TomAugspurger
    Member
  2. mrocklin commented on Oct 18, 2023

    @mrocklin
    Member

    I don't know enough about this specific ML metric, but maybe if we can translate the problem to something more general then I can be of use.

    For example, If someone had a distribution of values spread in an unsorted way across many machines and they wanted to plot an approximate sorted distribution of those points then there are a couple things they could do:

    1. The simplest would be to just sample. I suspect that it would be easy to get very good accuracy by sampling.

    2. But if for some reason they wanted to have all points influence the result then my recommendation would be to calculate a lot of approximate quantiles, for which there are good distributed algorithms. I suspect once one had, say, 100 percentiles (0%, 1%, 2%, ..., 99%, 100%) that one could take those values and reconstruct a distribution curve that was pretty close to full accuracy.

      Depending on the exact curve necessary one might need to invert the delta between neighboring percentiles or something similar. This might get mildly complex, but is the sort of thing one can probably do with ten minutes of thought and, importantly, without distributed systems experience.

    I may be entirely on the wrong track through. @stephenpardy can you help by reducing your problem a little bit to general numbers / computational terms? I suspect that it'll be easier for folks to help in that case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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