A Recursive Realistic Graph Generator using Random Typing
This code can be used to generate random graphs, that obey a bunch of properties which can be observed in real graphs. These properties are:
The general idea is to create character sequences by rondomly typing on a keyboard (base set of characters). These sequence are created in tupels and form the set of edges of the graph.
Main function of this package is the rtg(num_edges, num_chars, beta, q, num_timeticks, bipartite=False, self_loop=False)
function. It takes all needed parameters and outputs the generated graph as an edge list. The edege list can directly be used by the add_edges_from
function of the networx package.
num_edges
: The number of edges that should be generatednum_chars
: The number of characters used in the keyboardbeta
: The bias factor that penalizes adding different charactes to the sequences. See the paper for further informationq
: probability of the delimeter keynum_timeticks
: The number of timeticks in which edges were createdbibartite
: Boolean flag that defines weather the generated graph should be bepartite or notself_loop
: Boolean flag that defines weather the graph can contain self loops or not
The code is based on the paper RTG: A Recursive Realistic Graph Generator using Random Typing by Leman Akoglu and works similar to its MATLAB implementation