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

Sampler for bipartite graphs with given degrees #341

Open
gaborcsardi opened this issue May 4, 2013 · 7 comments
Open

Sampler for bipartite graphs with given degrees #341

gaborcsardi opened this issue May 4, 2013 · 7 comments
Assignees
Labels
sampling Issues related to (unbiased) random sampling theory The math behind the issue needs to be worked out; literature research needed wishlist Feature request that has not been chosen for implementation yet; vote or comment to prioritize it!

Comments

@gaborcsardi
Copy link
Contributor

See http://dx.doi.org/10.1016/j.physa.2006.04.047

And the code is actually here:
http://jlguillaume.free.fr/www/programs.php?lang=eng


Imported from Launchpad using lp2gh.

@gaborcsardi
Copy link
Contributor Author

The code on that page is not too useful, actually, it is just sampling the bottom vertices with replacement, individually for each top vertex. So it potentially generates multiple edges.

@gaborcsardi
Copy link
Contributor Author

But we can do a similar thing, only sampling without replacement.

@gaborcsardi
Copy link
Contributor Author

Well, no, it is actually somewhat more difficult, but it can still be done, of course. One needs two partial prefix sum trees, one for bottom, one for top nodes. We order the vertices (mixed) according to their degrees. Then pull the first neighbor of the highest degree vertex, adjust degrees and trees, and repeat.

@gaborcsardi
Copy link
Contributor Author

This is probably not uniform sampling, though......

@gaborcsardi
Copy link
Contributor Author

@ntamas ntamas removed the confirmed label Nov 17, 2021
@szhorvat szhorvat self-assigned this Dec 6, 2021
@szhorvat szhorvat added the theory The math behind the issue needs to be worked out; literature research needed label Dec 7, 2021
@szhorvat szhorvat changed the title Bipartite configuration model sampler Sampler for bipartite graphs with given degrees Jan 31, 2022
@mar-iana
Copy link

Hello,
I apologize for any confusion. It appears that the issue you mentioned is still unresolved. I haven't found the solution yet to perform a configuration model for bipartite networks , can it be? I also try using the "rewire" function along with "keeping_degseq," but it has resulted in generating links between nodes of the same type, which is supposed to not be allowed in bipartite networks.
If anyone has experience or suggestions on how to successfully apply the configuration model for bipartite networks would be greatly appreciated. Thank you in advance for your help!

@szhorvat
Copy link
Member

Sampling bipartite networks with given degrees is not available yet in igraph. It is planned to be implemented sometime this autumn, along with a bipartite version of rewire().

If anyone has experience or suggestions on how to successfully apply the configuration model for bipartite networks would be greatly appreciated.

You can implement the stub matching method yourself, as it's quite easy in high-level languages. See https://sites.santafe.edu/~aaronc/courses/5352/fall2013/csci5352_2013_L11.pdf

For further support questions, please use the forum. We would like to reserve the issue tracker for bug reports and feature requests as well as for coordinating development.

@szhorvat szhorvat added the sampling Issues related to (unbiased) random sampling label Jun 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sampling Issues related to (unbiased) random sampling theory The math behind the issue needs to be worked out; literature research needed wishlist Feature request that has not been chosen for implementation yet; vote or comment to prioritize it!
Projects
None yet
Development

No branches or pull requests

4 participants