There are metrics with that kind of input in sklearn.metrics.ranking. I
don't have the time to look them up now, but there have been proposals and
PRs for similar ranking metrics. Please search the issue tracker for
related issues. Thanks, Joel

On 21 January 2017 at 06:16, Johnson, Jeremiah <[email protected]>
wrote:

> Hi all,
>
> It’s common to use a top-n accuracy metric for multi-class classification
> problems, where for each observation the prediction is the set of
> probabilities for each of the classes, and a prediction is top-N accurate
> if the correct class is among the N highest predicted probability classes.
> I’ve written a simple implementation, but I don’t think it quite fits the
> sklearn api. Specifically, _check_targets objects to the the
> continuous-multioutput format of the predictions for a classification task.
> Is there any interest in including a metric like this? I’d be happy to
> submit a pull request.
>
> Jeremiah
>
>
> _______________________________________________
> scikit-learn mailing list
> [email protected]
> https://mail.python.org/mailman/listinfo/scikit-learn
>
>
_______________________________________________
scikit-learn mailing list
[email protected]
https://mail.python.org/mailman/listinfo/scikit-learn

Reply via email to