[scikit-learn] sample_weight for cohen_kappa_score

Andreas Mueller t3kcit at gmail.com
Mon Oct 3 09:09:54 EDT 2016

Hm it sounds like "weights" should have been called "weighting" maybe?
Not sure if it's worth changing now, as we released it already.

And I think passing the weighting to the confusion matrix is correct.
There should be tests for weighted metrics to confirm that.

PR welcome.

On 10/03/2016 05:21 AM, Poughon Victor wrote:
> Hello,
> I'd like to use samples weights together with sklearn.metrics.cohen_kappa_score,
> in a similar way to other metrics which have this argument. Is it as simple as
> forwarding the weights to the confusion_matrix call? [0]
> If yes I'm happy to work on the pull request.
> In that case the other argument "weights" might be confusing but it's too late
> to rename it, right?
> Cheers,
> Victor Poughon
> [0] https://github.com/scikit-learn/scikit-learn/blob/dee786a/sklearn/metrics/classification.py#L331
> _______________________________________________
> scikit-learn mailing list
> scikit-learn at python.org
> https://mail.python.org/mailman/listinfo/scikit-learn

More information about the scikit-learn mailing list