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

ENH: QR updating for penalized L2 estimation #6358

Open
josef-pkt opened this issue Dec 20, 2019 · 0 comments
Open

ENH: QR updating for penalized L2 estimation #6358

josef-pkt opened this issue Dec 20, 2019 · 0 comments

Comments

@josef-pkt
Copy link
Member

Just an idea while looking at the code for TheilGLS

(x'x + a S) beta = x'y
can be computed using data augmentation S_half = S^{-1/2}, vstack([x, S_half])
We use this in PIRLS in GAM

linalg:

we need `(x'x + a S)^{-1} = (x'x + a S_half' S_half)^{-1}

If S_half is low rank, i.e. has few rows, then this is a low rank updating of the inverse matrix, which is cheaper to compute than the full matrix inverse #6265.
Similar would apply if we use the QR decomposition of x and update the decomposition to vstack([x, S_half]) (but there we wouldn't have the inverse yet.

The advantage would be that we can do the updating for different pen_weights which are included in S_half

aside:
we have code for S_half in singular case with reduced number of rows.
tools.linalg.matrix_sqrt (adding with GAM PR)

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

No branches or pull requests

1 participant