Generalized linear models, abridged
bwlewis.github.io
bwlewis.github.io
To generalize well, it's almost always a good idea to have some sort of regularization, such as penalizing the sum of the square of the parameters. The extra term in the cost function will usually make the naive "normal equations" approach work fine, and give much the same predictions as fancy pivoted QR approaches. On my machine it's also a lot faster (the ball-park is ~~10x faster for large systems).
I'm glad R has super-solid robust GLM implementations. And unless you're fitting many models, you should probably just use such a library routine. However, I wish more tutorials and textbooks would spend more time on the reasons for numerical stability, and when one should care, rather than pushing that detail off into a trail of citations.
Did it trip anyone up?
Hopefully with this as a resource I'll be able to make some more progress on it!
[1]: https://github.com/AtheMathmo/rusty-machine/blob/master/src/...
<script type="text/javascript"
src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>
Everything is converted to https except this link and Firefox/Chrome then refuse to load the javascript on http from an https page.