Least squares polynomial fitting in Python, written so I can understand it
pingswept.org
pingswept.org
We are doing some device specific characterization and calibration work at my LED lighting startup, which is why I found the post so relevant. However, least-squares polynomial curve fitting techniques have immensely broad application in a variety of fields. Can't wait for the follow up. (Man, I'm such a geek)
That post took at least 10 hours over the past few weeks to write; it's gratifying to know you found it useful. The next one will probably be on regularized least squares (i.e. choosing an x that is close to optimal and also small, so it behaves well in later calculations).
You might also look at Stephen Boyd's videos on linear estimation: http://www.youtube.com/view_play_list?p=06960BA52D0DB32B
I think least squares is covered in lectures 5 and 6.