I don't think this has been fixed. The fix belongs in the
_average_binary_score helper function. A PR is welcome
On 3 October 2014 07:09, Victor Augusto Escorcia Castillo <
escorc...@gmail.com> wrote:
> Hi guys,
>
> I found a bug computing average precision score. It seems that the
> weighted computation only works for labels {0, 1}.
>
> y_true_1 = np.array([[-1, -1, 1, 1], [-1, -1, 1, 1]]).T
> y_true_0 = np.array([[0, 0, 1, 1], [0, 0, 1, 1]]).T
> y_scores = np.array([[0.1, 0.4, 0.35, 0.8], [0.1, 0.4, 0.35, 0.8]]).T
> print "weighted AP with -1:", average_precision_score(y_true_1, y_scores,
> average='weighted')
> print "weighted AP with 0:", average_precision_score(y_true_0, y_scores,
> average='weighted')
>
> There are many ways to fixed it. Let me know what it is your approach.
> I'm sorry, if you have already fixed it in devel branch.
>
> --
> VĂctor A. Escorcia Castillo
> Cellphone: +57-3012447606
> mail: escorc...@gmail.com / victor.casti...@kaust.edu.sa
>
>
> ------------------------------------------------------------------------------
> Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
> Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
> Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
> Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
>
> http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
> _______________________________________________
> Scikit-learn-general mailing list
> Scikit-learn-general@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
>
>
------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________
Scikit-learn-general mailing list
Scikit-learn-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general