DOI: 10.6084/m9.figshare.25055234.v1
title: QuickCent_computing_paper_datasets

description: All datasets, code to produce them and analyses shown in the submitted paper "QuickCent: a fast and frugal heuristic for harmonic centrality estimation on scale-free networks".All necessary code is in the file QCent_script.R. You should only source it on R to begin using it. The dependencies are the following packagesRWekaigraphMatrixggplot2poweRlawforeachdoParallel<br>All datasets are produced with the line of code:to_produce_all()If you want to add another network dataset from KONECT, you should download, uncompress it, open the file out.network_name in, for example, Calc from Open Office (max 1048576 rows= network edges allowed), and maintain only the two columns required to store the edges (From node, To node) (ie, remove additional columns or header rows). Save as out.csv. Open it on, for example, gedit, and search all separators such as "," or " ", and replace them by "\t". Thus, igraph::read_graph() can retrieve it as a network on R. Finally, add the KONECT internal name to list_of_networks, and you can process it to then analyze it by running, for example, script_to_execute_real()Next we share the scripts required to reproduce data and figures from the paper.Example 1res &lt;- get_example_PA(n=25,npv=2,x_min=1,training_size = 0.7)# indegree: res[[5]]# harmonic: res[[3]]# proportions: res[[14]]# alpha: res[[11]]# MAE: res[[1]][7]# QC estimates: res[[2]]# to see where proportions come from:harm.cent &lt;- res[[3]]x_min=1index_greater = which(harm.cent&gt;=x_min);npv=2test&lt;- obtener_cuantiles(harm.cent,npv,x_min);exp(test[[2]])<br>median(res[[3]][which(res[[5]]&lt;=0)])median(res[[3]][which((res[[5]]&lt;=3)&(res[[5]]&gt;0))])median(res[[3]][which((res[[5]]&lt;=4)&(res[[5]]&gt;3))])median(res[[3]][which(res[[5]]&gt;4)])<br># Fig 1tiff("Fig1.tif", res = 300,width=140,height=140,units="mm")plot(res[[10]],width=140,height=140,units="mm",edge.arrow.size=0.4,edge.arrow.width=2,layout=layout_with_dh) dev.off()# or layout_with_gem, label.cex=2, size=15<br># Fig2, d&lt;-plot_comparison_methods_II(ylim=21)<br># Fig3to_graph_cecdf_harm_synth()<br>#Table 2elaps_time&lt;-get_statistics_Table_III_IV("resultados_metodos_1_exp1_rms_8.csv")format(apply(elaps_time,2,mean)*1000,digits=2);format(apply(elaps_time,2,sd)*1000,digits=2);elaps_time&lt;-get_statistics_Table_III_IV("resultados_metodos_0.25_exp1_rms_8.csv")format(apply(elaps_time,2,mean)*1000,digits=2);format(apply(elaps_time,2,sd)*1000,digits=2);elaps_time&lt;-get_statistics_Table_III_IV("resultados_metodos_0.0625_exp1_rms_8.csv")format(apply(elaps_time,2,mean)*1000,digits=2);format(apply(elaps_time,2,sd)*1000,digits=2);<br># Fig4, d&lt;-get_statistics_PL_vs_RPL_II_expe(18)<br># Table 3g_pl_I = igraph::read_graph("moreno_blogs.csv")g_pl_III = igraph::read_graph("subelj_jung-j.csv")print_stat_PA_nw(g_pl_I,nw_name="moreno_blogs",scatter_log=TRUE)print_stat_PA_nw(g_pl_III,nw_name="subelj_jung-j",scatter_log=TRUE)<br># Fig 5d&lt;-get_statistics_PL_vs_ER_III_expe(184)<br># Table 4d&lt;-compute_analysis_dataframe(nw_names=list_of_networks,is_info_nw = indicator_sftw_hyp_comp_cit_ocont)<br># CODE for Supplementary Information Document# Fig 1 to_graph_cecdf_harm_synth()<br># Tables 1,2,3get_statistics_Table_I_II("valid_assumpt_exp1.5.csv")get_statistics_Table_I_II("valid_assumpt_exp1.csv")get_statistics_Table_I_II("valid_assumpt_exp0.5.csv")<br># Fig 2d0 &lt;-plot_MAE_dist_train_sizes(exponent=0.5,n_pv=8)d1 &lt;-plot_MAE_dist_train_sizes(exponent=1,n_pv=8)d2 &lt;-plot_MAE_dist_train_sizes(exponent=1.5,n_pv=8)<br># Table 4d&lt;-get_statistics_PL_vs_RPL_II_expe(18)<br># Fig 3to_graph_cecdf_harm_ER(pr=0.7)to_graph_cecdf_harm_ER(pr=0.0018)g_pl_I = igraph::read_graph("moreno_blogs.csv")g_pl_III = igraph::read_graph("subelj_jung-j.csv")print_stat_PA_nw(g_pl_I,nw_name="moreno_blogs",scatter_log=TRUE)print_stat_PA_nw(g_pl_III,nw_name="subelj_jung-j",scatter_log=TRUE)<br># Table 5d&lt;-get_statistics_PL_vs_ER_III_expe(184)