# \[ANN\] LinearRegressionKit

**URL:** https://discourse.julialang.org/t/ann-linearregressionkit/73769
**Category:** Package Announcements
**Tags:** package, regression, linear-regression
**Created:** [December 29, 2021, 5:12pm UTC](https://discourse.julialang.org/t/ann-linearregressionkit/73769 "2021-12-29T17:12:46Z")
**Posts on this page:** 1
**Showing post:** 5

<div class="post-metadata">

### Author: ![stevengj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevengj/32/71_2.png) [@stevengj](https://discourse.julialang.org/u/stevengj)
#### Post date: [November 19, 2022, 4:10pm UTC](https://discourse.julialang.org/t/ann-linearregressionkit/73769/5 "2022-11-19T16:10:43Z")

</div>

> [@Eric](#):
>
> Cholesky (from the anecdotal examples I have seen less prone to numerical errors)

Do you have a reference? Is there a quantitative analysis somewhere? The condition number seems to be the same as Cholesky so at best it seems you would gain a small constant factor.

> [@Eric](#):
>
> As it enables going further than visual/graph-driven analysis quickly

How is this different from QR?

> [@Eric](#):
>
> And finally, the loss of precision compared to QR/SVD, I think, is very dependent on the data studied;

Yes — in particular, since it squares the condition number, then it depends on the conditioning of your matrix. e.g. if your matrix has a condition number of 100, then it loses about 2 extra digits due to roundoff errors compared to QR, but if it has a condition number of 10^8 then you lose about 8 extra digits. See also this discussion: [Efficient way of doing linear regression - #33 by stevengj](https://discourse.julialang.org/t/efficient-way-of-doing-linear-regression/31232/33)

The reason why libraries often default to QR is that it can be hard for users to predict (or comprehend) whether their problem is well-conditioned, and reliability is prioritized over speed.

(I’ve also seen references to the ability of the sweep approach to incrementally add additional columns/variables, but of course you can [update QR incrementally as well](https://github.com/mpf/QRupdate.jl).)

---

_[View the full topic](https://discourse.julialang.org/t/ann-linearregressionkit/73769)._
