Talk:Polynomial regression: Difference between revisions

no edit summary
(→‎FORTRAN DGETRx: new section)
No edit summary
 
(3 intermediate revisions by 2 users not shown)
Line 1:
== which norm to be used? ==
 
In which norm the approximation has to be done? Euclidean? C-norm? The basis seem to be x<sup>n</sup>? --[[User:Dmitry-kazakov|Dmitry-kazakov]] 14:10, 4 June 2008 (MDT)
 
Line 45 ⟶ 47:
 
I would appreciate if somebody with the Fortran language available could confirm.
:The matrix product is associative, so mathematically there is no difference. Computationally, however, there is one, explained at [[Matrix chain multiplication]]. [[User:Eoraptor|Eoraptor]] ([[User talk:Eoraptor|talk]]) 16:33, 13 August 2020 (UTC)
 
== FORTRAN DGETRx ==
Line 52 ⟶ 55:
call DGETRI(n, XTX, lda, ipiv, work, lwork, info)
do? ..[[User:Walterpachl|Walterpachl]] ([[User talk:Walterpachl|talk]]) 18:13, 18 December 2016 (UTC)
:In [http://www.netlib.org/lapack/ LAPACK]'s documentation. [[User:Eoraptor|Eoraptor]] ([[User talk:Eoraptor|talk]]) 16:27, 13 August 2020 (UTC)
 
== Not what I expected ==
Adding here in case others get confused as I did...
 
I was expecting this code to generate a polynomial that matched to a series of x,y points, so that I could then use that formula to extrapolate. However, it seems that all the coefficients are sensitive to the absolute magnitude of the x values. :( For example, if I change the original data x values from 0-11 to 1000-1011 I get the answer
y = 2998001 - 5998*x - 0.036*x*x
 
I was expecting that it would change the first coefficient, but this is clearly a completely differently shaped parabola from y = 1 + 2x +3x*x
 
Fortunately, my data is a time series and in order, so I can subtract the initial x value from all the following x values.
2

edits