Skip to content

Cannot produce a Precision-Recall Curve from our Binary Classification Evaluator #2645

Closed
@rogancarr

Description

@rogancarr

In the Supported Scenarios for V1 (see #2498) we want to be able to easily plot a PR curve from output of the evaluator.

This is not currently possible in the current set of APIs*. As detailed in #2465, we cannot set a threshold on a binary classification prediction, so we cannot loop over the various thresholds. Furthermore, the Evaluator, while it has enough information to return lists of precisions and recalls at the various cutoffs, does not have an avenue to return this information.

* Well, actually this is possible using custom mappers like so:

  1. Get a list of all unique probability scores
    (e.g. by reading the IDataView as an enumerable and creating a dictionary of observed values)
  2. For each unique value of the probability:
    a. Write a custom mapper to produce PredictedLabel at that probability threshold.
    b. Calculate Precision and Recall with these labels.

However, it doesn't seem like this workaround qualifies as satisfying the V1 Scenario — it's a more advanced use of the APIs, and it requires an individual to understand the ins-and-outs of calculating PR curves

Metadata

Metadata

Assignees

Labels

APIIssues pertaining the friendly APIusabilitySmoothing user interaction or experience

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions