Homophilic random graph using BA preferential attachment model
Source:R/sample_pa_homophilic.R
sample_pa_homophilic.Rd
A graph of n nodes is grown by attaching new nodes each with m edges that are preferentially attached to existing nodes with high degree, depending on the homophily parameters.
Arguments
- n
number of nodes
- m
number of edges a new node is connected to
- minority_fraction
fraction of nodes that belong to the minority group
- h_ab
probability to connect a node from group a with groub b
- h_ba
probability to connect a node from group b with groub a. If NULL, h_ab is used.
- directed
should a directed network be created
Details
The code is an adaption of the python code from https://github.com/gesiscss/HomophilicNtwMinorities/
References
Karimi, F., Génois, M., Wagner, C., Singer, P., & Strohmaier, M. (2018). Homophily influences ranking of minorities in social networks. Scientific reports, 8(1), 1-12. (https://www.nature.com/articles/s41598-018-29405-7)
Espín-Noboa, L., Wagner, C., Strohmaier, M., & Karimi, F. (2022). Inequality and inequity in network-based ranking and recommendation algorithms. Scientific reports, 12(1), 1-14. (https://www.nature.com/articles/s41598-022-05434-1)