[SciPy-user] Fitting a polynomial to data
Fernando.Perez at colorado.edu
Thu Jun 30 16:42:05 CDT 2005
Alan G Isaac wrote:
> On Thu, 30 Jun 2005, Fernando Perez apparently wrote:
>>p = (XT*X)^-1 * XT * y
> Which is of course the ordinary least squares solution.
> I note this only because the discussion seemed to
> suggest that something special about polynomials was
> about to be exploited in producing the solution,
> but that something seems only to be the automatic
> production of the data matrix (and not any subsequent
> computations). Correct?
I know, I just mentioned polyfit b/c it encapsulates the construction in a
single, easy to use routine. The OP mentioned weak math skills, so I figured
a single-shot routine might be a good solution for him.
More information about the SciPy-user