Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cholesky pivoting #3

Open
SWotherspoon opened this issue Dec 1, 2017 · 1 comment
Open

Cholesky pivoting #3

SWotherspoon opened this issue Dec 1, 2017 · 1 comment

Comments

@SWotherspoon
Copy link

In the sparse and incremental variants, the resulting linear system is solved by Cholesky decomposition with pivoting. So $X^T X \beta = X^T y$ is solved essentially with

U <- chol(crossprod(X),pivot=TRUE)
p <- attr(U,"pivot")
backsolve(U,backsolve(U,crossprod(X,y)[p],transpose=TRUE))[p]

But shouldn't the final line be

backsolve(U,backsolve(U,crossprod(X,y)[p],transpose=TRUE))[order(p)]

to invert the original permutation?

@bwlewis
Copy link
Owner

bwlewis commented Jul 4, 2018

Yes, indeed, the pivoting has this bug sorry. I am in th emiddle of substantially revising these notes and will include a fix along these in the revised version, which should appear sometime in July 2018. Thanks!

(sorry for the extreme latency)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants