[jira] Created: (MAHOUT-557) Bug in Auc computation

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[jira] Created: (MAHOUT-557) Bug in Auc computation

Tim Allison (Jira)
Bug in Auc computation
----------------------

                 Key: MAHOUT-557
                 URL: https://issues.apache.org/jira/browse/MAHOUT-557
             Project: Mahout
          Issue Type: Bug
          Components: Classification
    Affects Versions: 0.4
            Reporter: Ted Dunning
             Fix For: 0.5


From Anil:

Another bug: in Auc.java
Classifier Evaluation :

when the scores are tied -
...
{quote}
       // how many negatives are tied?
       int k0 = 0;
       while (i0 < n0 && v0 == tieScore) {
         k0++;
         i0++;
         v0 = scores[0].get(i0);
       }

       // and how many positives
       int k1 = 0;
       while (i1 < n1 && v1 == tieScore) {
         k1++;
         i1++;
         v1 = scores[1].get(i1);
       }
{quote}

It sometimes goes Index out of bounds: Increment operation should be after accessing it

{quote}
 while (i0 < n0 && v0 == tieScore) {
         v0 = scores[0].get(i0);
         k0++;
         i0++;

       }

       // and how many positives
       int k1 = 0;
       while (i1 < n1 && v1 == tieScore) {
         v1 = scores[1].get(i1);
         k1++;
         i1++;

       }

{quote}

Verily, he speaks truth.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Resolved: (MAHOUT-557) Bug in Auc computation

Tim Allison (Jira)

     [ https://issues.apache.org/jira/browse/MAHOUT-557?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ted Dunning resolved MAHOUT-557.
--------------------------------

    Resolution: Fixed

Thanks to Anil for pointing out this oversight.

Fixed now with a test to match.


> Bug in Auc computation
> ----------------------
>
>                 Key: MAHOUT-557
>                 URL: https://issues.apache.org/jira/browse/MAHOUT-557
>             Project: Mahout
>          Issue Type: Bug
>          Components: Classification
>    Affects Versions: 0.4
>            Reporter: Ted Dunning
>             Fix For: 0.5
>
>
> From Anil:
> Another bug: in Auc.java
> Classifier Evaluation :
> when the scores are tied -
> ...
> {quote}
>        // how many negatives are tied?
>        int k0 = 0;
>        while (i0 < n0 && v0 == tieScore) {
>          k0++;
>          i0++;
>          v0 = scores[0].get(i0);
>        }
>        // and how many positives
>        int k1 = 0;
>        while (i1 < n1 && v1 == tieScore) {
>          k1++;
>          i1++;
>          v1 = scores[1].get(i1);
>        }
> {quote}
> It sometimes goes Index out of bounds: Increment operation should be after accessing it
> {quote}
>  while (i0 < n0 && v0 == tieScore) {
>          v0 = scores[0].get(i0);
>          k0++;
>          i0++;
>        }
>        // and how many positives
>        int k1 = 0;
>        while (i1 < n1 && v1 == tieScore) {
>          v1 = scores[1].get(i1);
>          k1++;
>          i1++;
>        }
> {quote}
> Verily, he speaks truth.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (MAHOUT-557) Bug in Auc computation

Tim Allison (Jira)
In reply to this post by Tim Allison (Jira)

    [ https://issues.apache.org/jira/browse/MAHOUT-557?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12970677#action_12970677 ]

Hudson commented on MAHOUT-557:
-------------------------------

Integrated in Mahout-Quality #504 (See [https://hudson.apache.org/hudson/job/Mahout-Quality/504/])
    MAHOUT-557 - Fixed bug and added test that demonstrates how tied scores can cause index out of range.


> Bug in Auc computation
> ----------------------
>
>                 Key: MAHOUT-557
>                 URL: https://issues.apache.org/jira/browse/MAHOUT-557
>             Project: Mahout
>          Issue Type: Bug
>          Components: Classification
>    Affects Versions: 0.4
>            Reporter: Ted Dunning
>             Fix For: 0.5
>
>
> From Anil:
> Another bug: in Auc.java
> Classifier Evaluation :
> when the scores are tied -
> ...
> {quote}
>        // how many negatives are tied?
>        int k0 = 0;
>        while (i0 < n0 && v0 == tieScore) {
>          k0++;
>          i0++;
>          v0 = scores[0].get(i0);
>        }
>        // and how many positives
>        int k1 = 0;
>        while (i1 < n1 && v1 == tieScore) {
>          k1++;
>          i1++;
>          v1 = scores[1].get(i1);
>        }
> {quote}
> It sometimes goes Index out of bounds: Increment operation should be after accessing it
> {quote}
>  while (i0 < n0 && v0 == tieScore) {
>          v0 = scores[0].get(i0);
>          k0++;
>          i0++;
>        }
>        // and how many positives
>        int k1 = 0;
>        while (i1 < n1 && v1 == tieScore) {
>          v1 = scores[1].get(i1);
>          k1++;
>          i1++;
>        }
> {quote}
> Verily, he speaks truth.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.