-
Notifications
You must be signed in to change notification settings - Fork 84
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
tikhonov_from_prior treats incorrectly zero_indices #356
Comments
this is standard way to invert a matrix, it's the moore-penrose pseudoinverse. Why do you see a problem with this? |
What is the reason to use Moore-Penrose pseudo-inverse to regularize? In that case, say you have a singular value a bit over threshold (say 0.0002 with current defaults). Then, the projected space will regularize heavily this value (as expected). Other singular values that do not survive the cutoff (<=threshold) will not be regularized at all (except for a tiny quantity =threshold). |
do you observe this problem in your data? what's the standard way to deal with this? If you just invert a 0 in a singular matrix, it will blow up. |
I am not using yet your code to regularize an elasticnet model, but I'm planning to implement it very soon. My issue is of a theoretical character: I wonder what is the the case in which small singular value (SV) directions are close to not being regularized versus the larger SV directions. In my current understanding, one introduces a ridge regularizer (Thikonov matrix proportional to identity) to shift the Moore-Penrose inverse of the On the other hand, the computation proposed in In my proposal, due to the small SV being shifted to threshold, the inversion of those indices too, would make the Tikhonov matrix very large (~1e4) in those directions and, to all purposes, they would disappear from the regression. |
@pavanramkumar do you have any comments here? |
@ivarzap thanks for your question.
Hope this helps! |
@pavanramkumar I do think what we are doing is a bit non-standard. The threshold should probably be 0 by default? And in any case we should use |
pyglmnet/pyglmnet/utils.py
Line 85 in b403bac
Should be:
S_inv = 1. / S_inv
Otherwise, small singular values would be close to not being regularized
The text was updated successfully, but these errors were encountered: