-
Notifications
You must be signed in to change notification settings - Fork 37
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
Consider calling glm.fit() instead of glm() #569
Comments
@mbojan , can you test to see if this works? |
@mbojan , I'll be submitting an update to |
Oh dear, I have a week of workshops, including ergms. Can we release next week? The principle answer is yes, but haven't tested yet. |
OK, can you get it done in the next day or two? |
@mbojan ? |
@AdrienLeGuillou , you often fit MPLE to large networks, right? Can you by any chance test this? |
I just ran a quick test on a smaller 10k nodes network using this branch. It worked fine. I can't tell if it was faster or not as I usually work with "Stochastic-Approximation" on these smaller local tests. |
I just realized that |
I confirm it also works on the 100k nodes network. |
Thanks @AdrienLeGuillou . @krivit don't merge, leave as is. I need to dig out the script where I think I noticed the difference. |
A few things to try:
|
I just run a few tests on the HPC with a 100k nodes with I don't see any difference.
That was the last run with the Both branches gives total times between 0.4 and 0.6 . I think that for big networks this is not very important as the overhead of For smaller networks it probably makes a lot more sense. For reference, this is the formula used for the network: model_main <- ~ edges +
nodematch("age.grp", diff = TRUE) +
nodefactor("age.grp", levels = -1) +
nodematch("race", diff = FALSE) +
nodefactor("race", levels = -1) +
nodefactor("deg.casl", levels = -1) +
concurrent +
degrange(from = 3) +
nodematch("role.class", diff = TRUE, levels = c(1, 2))
|
@krivit @AdrienLeGuillou Thanks for investigating. I can't find the usecase in which I think noticed that effect. Did you look at the possible effect on memory footprint too? I'd say we can declare this issue as "unconfirmed" and let it rest. |
@mbojan |
In
ergm/R/ergm.mple.R
Lines 100 to 101 in 1f4401e
consider calling
glm.fit()
directly rather thanglm()
. Experiments with biggish data show that it might cut the computing time by half.The text was updated successfully, but these errors were encountered: