[SciPy-user] linear regression
Wed May 27 10:59:02 CDT 2009
On Wed, May 27, 2009 at 11:54 AM, ms <firstname.lastname@example.org> wrote:
> email@example.com ha scritto:
>> On Wed, May 27, 2009 at 10:05 AM, ms <firstname.lastname@example.org> wrote:
>>> email@example.com ha scritto:
>>>> Is there a recommended way now of calculating the slope of a linear
>>>> regression? Using the scipy.stats.linregress function gives a
>>>> deprecation warning, apparently because that function uses the
>>>> scipy.mean function:
>>> I think you can use polyfit for doing linear regression, isn't it?
>> but you don't get the slope coefficient and the standard errors, if
>> you want more than just prediction.
> You mean the correlation coefficient? This is numpy.corrcoef() or
> something like that.
He means that polyfit does not provide the Betas in a linear fit of,
for example, y = Beta * x + Beta2 * x**2 and their associated standard
errors. It will only give you the predictions (ie., Y-hats) for your
data based on the fit.
Yes, my GSoC will be of interest to you, if you use SciPy for linear
regression. Right now it's a bit slow going as I have comps looming
over my head in the next week and much of the work is being done
outside of SciPy until the code to be included is cleaned up and some
design issues are settled, but significant strides will be made in the
next few weeks.
You can follow the progress here with some examples and tutorials (for
usage and stats probably) <http://scipystats.blogspot.com>. Posts
will be more frequent over the next three months (I promise).
More information about the SciPy-user