-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.m
61 lines (53 loc) · 2.13 KB
/
main.m
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
% Read in the data using connectome_reader
clear;
socp = 'social.xlsx';
strp= 'structural.xlsx';
lp = 'node_labels.txt';
[social,structural,social_results,structural_results,names,edgeNames] = connectome_reader(socp, strp, lp);
clear socp; clear strp; clear lp;
%Fill in the table
[social_results, structural_results] = connectome_properties(social_results, structural_results, social, structural);
%EDGE TESTS
%Edge test 1: Kolmogorov-Smirnov tests on random graphs
sz = 200;
[alphas_soc, vals_soc] = social_ks_test(social,structural, sz);
[alphas_ERpower_ks_test, vals_ERpower_ks_test] = erdos_renyi_power_ks_test(social, structural, sz);
[alphas_multinomial_ks_test, vals_multinomial_ks_test] = multinomial_ks_test(social, structural,sz);
[alphas_ERdirichlet_ks_test, vals_ERdirichlet_ks_test] = erdos_renyi_dirichlet_ks_test(social, structural, sz);
[alphas_shuffle,vals_shuffle] = random_shuffle(social, structural, sz);
figure();
subplot(2,2,1);
plot(alphas_soc, vals_soc, 'r');
hold on;
plot(alphas_ERpower_ks_test, vals_ERpower_ks_test, 'b');
xlabel('Alpha values');
ylabel('KS-test values');
title('Erdos-Renyi power random graph results');
legend('Social graph results' ,'Random graph results');
subplot(2,2,2);
plot(alphas_soc, vals_soc, 'r');
hold on;
plot(alphas_multinomial_ks_test, vals_multinomial_ks_test, 'b');
xlabel('Alpha values');
ylabel('KS-test values');
title('Multinomial random graph results');
legend('Social graph results' ,'Random graph results');
subplot(2,2,3);
plot(alphas_soc, vals_soc, 'r');
hold on;
plot(alphas_ERdirichlet_ks_test, vals_ERdirichlet_ks_test, 'b');
xlabel('Alpha values');
ylabel('KS-test values');
title('Erdos-Renyi Dirichlet random graph results');
legend('Social graph results' ,'Random graph results');
subplot(2,2,4);
plot(alphas_soc, vals_soc, 'r');
hold on;
plot(alphas_shuffle, vals_shuffle, 'b');
xlabel('Alpha values');
ylabel('KS-test values');
title('Shuffled random graph results');
legend('Social graph results' ,'Random graph results');
%Edge test 2: k-means clustering on hubs and edges
%kmeans_connectome_clustering(social, structural, names, edgeNames);
%Edge test 3: Edge betweenness centrality