Thanks to visit codestin.com
Credit goes to github.com

Skip to content

The shape of threshold returned by precision_recall_curve #4996

Closed
@yangj1e

Description

@yangj1e

In the sklearn.metrics.precision_recall_curve documentation,

thresholds : array, shape = [n_thresholds := len(np.unique(probas_pred))]

But as the example below shows,

>>> y_scores = np.array([0.1, 0.4, 0.35, 0.8])
...
>>> thresholds
array([ 0.35,  0.4 ,  0.8 ])

the shape of threshold is not len(np.unique(probas_pred)).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions