[SciPy-user] Fitting a polynomial to data

CJ Fleck list.cj at gmail.com
Thu Jun 30 16:17:13 CDT 2005


How do you use a linear regression to get the polynomial coefficients?

On 6/30/05, Alan G Isaac <aisaac at american.edu> wrote:
> On Thu, 30 Jun 2005, CJ Fleck apparently wrote:
> > I have some data points that I'd like to fit a polynomial to.  I have
> > a gut feeling that this can be done with scipy, but I'm not sure how.
> > Admitadly, my math skills are a bit lacking and I'm not real sure how
> > to go about it.
> 
> You can certainly do this in scipy:
> you can just use a linear regression
> to get the polynomial coefficients.
> 
> You can also use a polynomial fitting function
> in Scientific Python, if I recall.
> http://starship.python.net/~hinsen/ScientificPython/
> Scientific.Functions.LeastSquares
> 
> hth,
> Alan Isaac
> 
> 
> 
> _______________________________________________
> SciPy-user mailing list
> SciPy-user at scipy.net
> http://www.scipy.net/mailman/listinfo/scipy-user
>



More information about the SciPy-user mailing list