-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.m
More file actions
63 lines (48 loc) · 1.46 KB
/
Copy pathmain.m
File metadata and controls
63 lines (48 loc) · 1.46 KB
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
%% Measuring Strength of Joint Causal Effects
% This code reproduces the figures/tables from our paper. To generate all figures
% (as .png files), you just need to run main.m. The code should run with no
% issues using Matlab 2022a or later. All generated figures and tables will
% be saved to the results folder.
%% Set up the Matlab path
addpath(genpath('./data'))
addpath('./functions')
addpath('./results')
addpath('./scripts')
%% Record to a log file
diary './results/output.log'
% Optional: Turn off warnings (that might clutter the log file)
% warning('off','all')
%% Experiments
% Running these scripts will reproduce figures from the paper
% Table 1
disp('Generating Table 1')
table_kernels
% Fig 1
% Visualization of the local interaction function
disp('Generating Figure 1')
fig_local_int_fcn
% Fig 2
% Comparison of kernels
disp('Generating Figure 2')
Fig_kernels
% Figs 3 and 4
% Figure 3: A sample from the Volterra model
% Figure 4: Comparison of the true model, the estimated MDCE from GPR,
% the Volterra model estimate, and the Bayes detector
disp('Generating Figures 3 and 4')
Fig3_4_Volterra
% Fig 5
% Robustness of the MDCE to linear confounders
disp('Generating Figure 5')
Fig5_confounder
% Fig 6
% Comparison of exact GPR with sparse approximation
disp('Generating Figure 6')
Fig6_sparse
% Fig 7
% Real data example using New Taipei City data
disp('Generating Figure 7')
fig_taipei
%% Stop writing to the log file
disp('Running is complete')
diary 'off'