-
Notifications
You must be signed in to change notification settings - Fork 16
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
All glm algo's much slower than glm.fit - problem with starting values? #4
Comments
Yes, it's funny you brought this up just now. I have a big revision of
these notes almost ready that has been lingering around for ages.
As you point out the starting values are a big issue, also related to
convergence problems in some cases.
I expect the updated notes to get posted soon, perhaps today...
…On 8/8/18, Tom Wenseleers ***@***.***> wrote:
I noticed that all algo's listed are significantly slower than the inbuilt
glm.fit. Why is this? Does glm.fit use better starting values perhaps? Or is
this due to the use of .Call(C_Cdqrls as opposed to the use of solve() in
the glm.fit code?
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
#4
|
Many thanks for this - I found your notes to be really helpful! Interestingly though, for a very small problem I was testing here now (3 variables, 1000 cases, Poisson error) I found the Looking forward to your update! |
I don't have time to finish the new write up today, but try this new code attached (as a gzipped file, that's all that GitHub would accept somehow). It's a very nearly complete new reference implementation using the SVD approach. On modern systems linked to a decent BLAS library it should be faster than glm.fit for large problems. For example, on my quad-core AMD home PC I ran this quick and dirty test:
This code will be posted to the repository as soon as I can finish the new write up, which is quite involved... |
Ha that's great - many thanks for that! I see you use the same initialization strategy now as in R's implementation, using eval(family$initialize)! On my 4 core laptop with Intel MKL loaded this is indeed 6 times faster than glm.fit (finishing in 4s vs 25s for glm.fit)! That's really great - thanks a lot! |
Might be worth changing the irls function that you lay out to something like this, i.e. with correct initialization :
|
I noticed that all algo's listed are significantly slower than the inbuilt
glm.fit.
Why is this? Doesglm.fit
use better starting values perhaps? Or is this due to the use of.Call(C_Cdqrls...)
inglm.fit
as opposed to the use ofsolve()
in theirls
code?The text was updated successfully, but these errors were encountered: