-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompute_exact_percolations.jl
44 lines (37 loc) · 1.19 KB
/
compute_exact_percolations.jl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
include("src/PERC.jl")
# Undirected
#=
#datasets = ["03_ca_astroph.txt","07_large_twitch_edges.txt"]
datasets = ["00_hiv.txt","00_ego-fb-combined-N.txt"]
directed = false
graphs_path = "graphs/"
percolation_path = "percolation_states/"
separator = "\t"
normalized = true
for ds in datasets
gf = graphs_path*ds
g = load_graph(gf,directed,separator)
perc = read_percolation(percolation_path*ds)
ds_name = string(split(ds,".txt")[1])
@info("Computing Ground Truth percolation centrality for "*ds_name)
flush(stderr)
x = parallel_percolation_centrality(g,perc,normalized)
save_results(ds_name,"exact",x[1],x[2])
end
=#
# Directed
#datasets = ["04_web_notredame.txt","06_web_google.txt","08_web_berkstan.txt"]
datasets = ["05_wiki_talk","13_soc_pokec.txt"]
directed = true
separator = "\t"
normalized = false
for ds in datasets
gf = graphs_path*ds
g = load_graph(gf,directed,separator)
perc = read_percolation(percolation_path*ds)
ds_name = string(split(ds,".txt")[1])
@info("Computing Ground Truth percolation centrality for "*ds_name)
flush(stderr)
x = parallel_percolation_centrality(g,perc,normalized)
save_results(ds_name,"exact",x[1],x[2])
end