Skip Menu |

This queue is for tickets about the Statistics-RankCorrelation CPAN distribution.

Report information
The Basics
Id: 53963
Status: resolved
Priority: 0/
Queue: Statistics-RankCorrelation

People
Owner: Nobody in particular
Requestors: yikes2000 [...] yahoo.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.11_3
Fixed in: (no value)



Subject: Patch for Kendall's Tau with tied ranks
The bug was that tie pairs were being counted as discordant. 241,243c241,244 < if( sign( $self->{x_data}[$j] - $self->{x_data}[$i] ) == < sign( $self->{y_data}[$j] - $self->{y_data}[$i] ) < ) { $concordant++ } --- Show quoted text
> my $x_sign = sign( $self->{x_data}[$j] -
$self->{x_data}[$i] ); Show quoted text
> my $y_sign = sign( $self->{y_data}[$j] -
$self->{y_data}[$i] ); Show quoted text
> if (! $x_sign || ! $y_sign) {} > elsif ($x_sign == $y_sign) { $concordant++ }
Statistics-RankCorrelation$ prove -l lib -v t says that kendall tau and spearman rho are "not ok." I will revisit and investigate. Thank you ... Test Summary Report ------------------- t/1.t (Wstat: 1792 Tests: 77 Failed: 7) Failed tests: 25, 30, 38, 54, 60, 73, 77 Non-zero exit status: 7 Files=1, Tests=77, 0 wallclock secs ( 0.05 usr 0.00 sys + 0.06 cusr 0.00 csys = 0.11 CPU) Result: FAIL
Subject: Re: [rt.cpan.org #53963] Patch for Kendall's Tau with tied ranks
Date: Sun, 24 Jan 2010 18:16:51 -0800 (PST)
To: bug-Statistics-RankCorrelation [...] rt.cpan.org
From: Andy <yikes2000 [...] yahoo.com>
My patch only addresses Kendall Tau with tied ranks, not Spearman.  It fixed test #42, 50, and 65, but not 34 and 69 (also Kendall with tied ranks).  I will look into it too... --- On Sun, 1/24/10, Gene Boggs via RT <bug-Statistics-RankCorrelation@rt.cpan.org> wrote: From: Gene Boggs via RT <bug-Statistics-RankCorrelation@rt.cpan.org> Subject: [rt.cpan.org #53963] Patch for Kendall's Tau with tied ranks To: yikes2000@yahoo.com Date: Sunday, January 24, 2010, 6:06 PM <URL: https://rt.cpan.org/Ticket/Display.html?id=53963 > Statistics-RankCorrelation$ prove -l lib -v t says that kendall tau and spearman rho are "not ok." I will revisit and investigate.  Thank you ... Test Summary Report ------------------- t/1.t (Wstat: 1792 Tests: 77 Failed: 7)   Failed tests:  25, 30, 38, 54, 60, 73, 77   Non-zero exit status: 7 Files=1, Tests=77,  0 wallclock secs ( 0.05 usr  0.00 sys +  0.06 cusr  0.00 csys =  0.11 CPU) Result: FAIL
I meant to say that "With the patched code, ..." there. :)
Subject: Re: [rt.cpan.org #53963] Patch for Kendall's Tau with tied ranks
Date: Sun, 24 Jan 2010 18:42:05 -0800 (PST)
To: bug-Statistics-RankCorrelation [...] rt.cpan.org
From: Andy <yikes2000 [...] yahoo.com>
Found the problems in t/1.t: % diff t/1.t.orig t/1.t 70c70 < ( $r, $t ) = ( 0.941, 0.745 ); --- Show quoted text
> ( $r, $t ) = ( 0.941, 0.894 );
155c155 < @y = qw( 0  0  0  0 20 20  0 60  0 20 10 10  0 40  0 20  0  0  0  0 ); --- Show quoted text
> @x = qw( 0  0  0  0 20 20  0 60  0 20 10 10  0 40  0 20  0  0  0  0 );
After that, all tests passed!  Yay!  :-) --- On Sun, 1/24/10, Gene Boggs via RT <bug-Statistics-RankCorrelation@rt.cpan.org> wrote: From: Gene Boggs via RT <bug-Statistics-RankCorrelation@rt.cpan.org> Subject: [rt.cpan.org #53963] Patch for Kendall's Tau with tied ranks To: yikes2000@yahoo.com Date: Sunday, January 24, 2010, 6:06 PM <URL: https://rt.cpan.org/Ticket/Display.html?id=53963 > Statistics-RankCorrelation$ prove -l lib -v t says that kendall tau and spearman rho are "not ok." I will revisit and investigate.  Thank you ... Test Summary Report ------------------- t/1.t (Wstat: 1792 Tests: 77 Failed: 7)   Failed tests:  25, 30, 38, 54, 60, 73, 77   Non-zero exit status: 7 Files=1, Tests=77,  0 wallclock secs ( 0.05 usr  0.00 sys +  0.06 cusr  0.00 csys =  0.11 CPU) Result: FAIL
On Sun Jan 24 18:42:21 2010, Yikes2000 wrote: Show quoted text
> Found the problems in t/1.t: > > 70c70 > < ( $r, $t ) = ( 0.941, 0.745 );
> > ( $r, $t ) = ( 0.941, 0.894 );
> 155c155 > < @y = qw( 0  0  0  0 20 20  0 60  0 20 10 10  0 40  0 20  0  0  0  0
); Show quoted text
> > @x = qw( 0  0  0  0 20 20  0 60  0 20 10 10  0 40  0 20  0  0  0  0
); Show quoted text
> > After that, all tests passed!  Yay!  :-)
Hrmm. With the t/1.t changes, I still get kendall tau failures. Test Summary Report ------------------- t/1.t (Wstat: 1792 Tests: 77 Failed: 7) Failed tests: 25, 30, 38, 54, 60, 73, 77 TODO passed: 34, 68 Non-zero exit status: 7
Subject: Re: [rt.cpan.org #53963] Patch for Kendall's Tau with tied ranks
Date: Sun, 24 Jan 2010 21:59:41 -0800 (PST)
To: bug-Statistics-RankCorrelation [...] rt.cpan.org
From: Andy <yikes2000 [...] yahoo.com>
Hm...  It's all okay for me.  Perhaps you made additional changes to the files.  Enclosed are my version of RankCorrelation.pm and 1.t. Test Summary Report ------------------- t/1.t (Wstat: 0 Tests: 77 Failed: 0)   TODO passed:   34, 42, 50, 65, 68-69 Files=1, Tests=77,  0 wallclock secs ( 0.03 usr  0.00 sys +  0.02 cusr  0.01 csys =  0.06 CPU) Result: PASS

Message body is not shown because sender requested not to inline it.

Message body is not shown because sender requested not to inline it.

On Sun Jan 24 21:59:59 2010, Yikes2000 wrote: Show quoted text
> Hm...  It's all okay for me.  Perhaps you made additional changes to > the files.  Enclosed are my version of RankCorrelation.pm and 1.t.
Aha! I had failed to include the crucial "else { $discordant++ }" line. Everything works finally! Whew! I owe you many pints of your favorite beverage. :) collaboration++ I will upload a shiny new version, to CPAN, shortly. Thanks again, Andy, Gene Boggs Software Engineer-at-large