-
Notifications
You must be signed in to change notification settings - Fork 92
/
Copy pathconductances.m
110 lines (82 loc) · 2.59 KB
/
conductances.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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
% first load a 'results' .mat file
% There are 15 total datsets:
% 12 small
% 3 large: ljournal, twitter, friendster
%
% for each graph, get a column vector, X, of conds.
%
% For SMALL DATA
% we'll use the experiment randseed:
% set experimenttype = 1;
% use datax = conds(id, trialnum, experimenttype)';
output_directory = '../results/';
data_directory = '../results/';
filename = 'newsmalldata';
load([data_directory filename]);
numdata = 3+numel(filename);
percdata = zeros(numdata,3,2);
inputsize = zeros(numdata,1);
experimenttype = 1;
numgraphs = numel(filename);
inputsize(1:numgraphs) = gsize(1:numel(filename),1)+gsize(1:numel(filename),2);
functionid = 1; % for hk, 2 is for ppr
for id=1:numgraphs
datax = conds(id,:,experimenttype)';
percdata(id,:,functionid) = prctile(datax,[25 50 75],1);
end
load newsmallppr;
filename = '';
load([data_directory filename]);
functionid = 2; % for hk, 2 is for ppr
for id=1:numgraphs
datax = conds(id,:,experimenttype)';
percdata(id,:,functionid) = prctile(datax,[25 50 75],1);
end
% now get LARGE DATA
% We have to do this one at a time, since each has
% its own .mat file
% friendstertrials
% twitterptrials
% ljournaltrials
% do HK first
functionid = 1;
filename = 'friendstertrials';
load([data_directory filename]);
id = numgraphs+1;
inputsize(id) = gsize(:,1)+gsize(:,2);
datax = conds(:,experimenttype);
percdata(id,:,functionid) = prctile(datax,[25 50 75],1);
filename = 'twitterptrials';
load([data_directory filename]);
id = numgraphs+2;
inputsize(id) = gsize(:,1)+gsize(:,2);
datax = conds(:,experimenttype);
percdata(id,:,functionid) = prctile(datax,[25 50 75],1);
filename = 'ljournaltrials';
load([data_directory filename]);
id = numgraphs+3;
inputsize(id) = gsize(:,1)+gsize(:,2);
datax = conds(:,experimenttype);
percdata(id,:,functionid) = prctile(datax,[25 50 75],1);
% now do PPR
functionid = 2;
filename = 'pprfriendstertrials';
load([data_directory filename]);
id = numgraphs+1;
% inputsize(id) = gsize(:,1)+gsize(:,2);
datax = conds(:,experimenttype);
percdata(id,:,functionid) = prctile(datax,[25 50 75],1);
filename = 'pprtwitterptrials';
load([data_directory filename]);
id = numgraphs+2;
% inputsize(id) = gsize(:,1)+gsize(:,2);
datax = conds(:,experimenttype);
percdata(id,:,functionid) = prctile(datax,[25 50 75],1);
filename = 'pprljournaltrials';
load([data_directory filename]);
id = numgraphs+3;
% inputsize(id) = gsize(:,1)+gsize(:,2);
datax = conds(:,experimenttype);
percdata(id,:,functionid) = prctile(datax,[25 50 75],1);
% HAVE ALL DATA
save([output_directory 'conductances' '.mat'], 'newindexing','percdata', 'inputsize','-v7.3');