-
Notifications
You must be signed in to change notification settings - Fork 1
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
Is blockdiagTNT
proposal actually needed?
#26
Comments
I was just thinking the other day about our ergm manuscript, part 2. Maybe it's a good idea to add material on RLEBDM-based TNT and finally ship it out to a more computational (as opposed to software-oriented) journal. There's no way I could work on this prior to mid-April but maybe after that point... |
I'll do some quick tests on blocks with inhomogeneous densities, and if those don't show a benefit for But yes, it would be good to get that paper out. |
Agreed regarding the paper. But why deprecate |
Like everything else, it adds to compile time and has to be maintained. It also has to be prioritised against other proposals that implement the DyadGen API (and can thus handle any dyad-independent constraint). Also, I've just checked, and both proposals TNT-propose both edges and dyads uniformly. That is, the probability that the selected edge/dyad is from a given block is the proportion out of total edges/dyads found in that block. There might be some benefit to selecting in proportion to some other function of block size, if that were to be implemented. On the other hand, it looks like at the moment blockdiagTNT uses a bisection algorithm to select dyads at random, which is O(log(B)), whereas RLEBDM TNT uses rejection sampling, which is close to O(1) if the largest block isn't that much larger than the rest. I suppose we could see if blockdiagTNT is faster with rejection sampling or Walker's Alias or similar. |
Based on benchmarks, it seems that net of initialisation, RLEBDM-based TNT is at least as fast as block-diagonal TNT:
Created on 2024-02-20 with reprex v2.1.0
Created on 2024-02-20 with reprex v2.1.0
The dependence factors are about the same, at least if the blocks' densities are homogeneous:
Created on 2024-02-20 with reprex v2.1.0
The text was updated successfully, but these errors were encountered: