For pseudocode for all algorithms, see Appendix of draft in Draft
.
- Code: folder containing MATLAB & R code to reproduce all results in the manuscript
- Draft: contains tex stuff for our draft
- Figs: all figures from the plotting code used in the draft
- Data: contains the processed raw data to reproduce all results in the draft, and existing results to readily generate the figures.
- MATLAB (works in R2016B)
- osx (works in sierra 10.12.5)
- Navigate to folder
XXX
. - To load demo data, type
load demo.mat
, which loads X and Y into the workspace. Note that X is a n-by-d matrix and Y is a n-by-q matrix. - To run on data, in MATLAB, type
[a,b,c] = MGC(X,Y)
- The output will be a set of figures and the p-value, test statistic, optimal scales, XXX.
Add all folders and subfolders of MGC to the path. To repeat the simulations and real data experiments, run any of the following:
run_1d_sims;
run_hd_sims;
run_realData;
plot_all;
% to run all the plots
The running time on a standard i7 desktop takes around 1 day for 1D and HD simulations, and around 10 minutes for the real data.
All codes are in MGC/Code/R, and do run_realData
to give an example of MGC running on real data.
Typical running time: 1 minute on a standard i7 desktop