![]() ![]() The data are stored in the same directory as csv file the following name: degree_evolution, BC_evolution, CC_evolution, Clustering_evolution. In the same way at each step it also calculates the main values of each feature distribution and its standard deviation. The number of the steps of this process are the ones of the variables n_step and n_step_degree (this one is only for the degree feature), these value can be modify by the user in the parameters.py. So the cumulative distribution are calculated n times at each step the number of links of the network taken into account increase till reaching the fixed number. Then the code stores the data related to the evolution of the cumulative distribution of the features within the increasing of the network size. The default name is setting using as a name the number of edges and the seed used. The name of the directory where the file is stored, name_simulation, is a parameter that the user could change. The next part of the code calculates the distribution of degree, betweenness centrality, closeness centrality and clustering and it assigns at each node a community.Īll this data are stored in a csv file with the name data_road. The links are chosen in the order in which they are presented in the file. Then the code generate a network using only the first number_of_edge expressed in the parameters.py, so it is not mandatory to take into account all the links of the network. The position of the data file, file_position, is one of the parameters that can be changed, the default one is the path related to this repository. In the first lines it stores the data related to all the couple of nodes of the graph. Finally it also calculates the distribution of the features of an ER graph with the same number of nodes and same link density. The file road_map.py contains the code useful to read the file of all the couples of nodes, deleting any bugs in the dataset, it calculates the degree, betweeness centrality, closeness centrality and clustering of each node and simulates how these features evolves with the increasing of the network size. The California road map and ERG simulations (road_map.py) \Copycat_plot.py,the outputs are stored in same directory of the copycat csv data. To visualize the data plots of this simulation the command line to invoke is. \Copycat.py, the outputs are stored in csv files in a new directory whose name is the one set by the variable name_simulation in the file parameters_Copycat.py. To launch the simulation to generate a network which tries to emulate the reduced California road map the command line is. \plot_road_map.py, the outputs are stored in same directory of the csv data. To visualize the data of the California road network simulation the command line is. \road_map.py, the outputs are stored in csv files in a new directory whose name is the one set by the variable name_simulation in the file parameters.py. To launch the simulations related to the reduced California road network the command line to invoke is. In these files default values are already given. They are stored in the files parameters.py and parameters_Copycat.py. Before all the simulations some parameters need to be set. All codes must be executed inside a python environment, thus it could be necessary to add python before the instructions shown.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |