[SciPy-dev] code for incremental least squares

Nathaniel Smith njs at pobox.com
Wed Feb 17 00:31:16 EST 2010


On Tue, Feb 16, 2010 at 8:51 PM,  <josef.pktd at gmail.com> wrote:
> I found this comment in incremental_ls
>
>        # R and Scipy disagree by about 3 orders of magnitude here:
>        #  pf(4704.7767809675142416, 4, 12, lower.tail=FALSE) == 4.68-19
>        #  1 - f.cdf(4704.7767809675142416, 4, 12) == 1.11-16
>        # which I guess is most likely Scipy having limited resolution in the
>        # tails.
>
>>>> from scipy import stats
>>>> stats.f.sf(4704.7767809675142416, 4, 12)
> 4.6848221938640787e-019
>
> some of our tails are also pretty good

Oh, awesome, I'd missed .sf() -- thanks for the pointer! It's
aesthetically annoying to plot p-values on a graph and always have
weird discontinuities where they underflow...

-- Nathaniel



More information about the SciPy-Dev mailing list