{"id":19448510,"url":"https://github.com/neurodata/mgc-paper","last_synced_at":"2026-03-07T17:31:30.916Z","repository":{"id":30790366,"uuid":"34347339","full_name":"neurodata/MGC-paper","owner":"neurodata","description":"MGC: multiscale graph correlation (pronounced \"magic\")","archived":false,"fork":false,"pushed_at":"2020-10-12T18:02:44.000Z","size":2153282,"stargazers_count":2,"open_issues_count":5,"forks_count":11,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-02-25T08:53:52.868Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://neurodata.io","language":"Matlab","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/neurodata.png","metadata":{"files":{"readme":"ReadMe.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-04-21T19:19:29.000Z","updated_at":"2018-12-14T00:19:26.000Z","dependencies_parsed_at":"2022-09-08T16:12:24.181Z","dependency_job_id":null,"html_url":"https://github.com/neurodata/MGC-paper","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/neurodata/MGC-paper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neurodata%2FMGC-paper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neurodata%2FMGC-paper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neurodata%2FMGC-paper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neurodata%2FMGC-paper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/neurodata","download_url":"https://codeload.github.com/neurodata/MGC-paper/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neurodata%2FMGC-paper/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30223251,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-07T17:00:40.062Z","status":"ssl_error","status_checked_at":"2026-03-07T17:00:39.026Z","response_time":53,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-10T16:27:18.659Z","updated_at":"2026-03-07T17:31:30.850Z","avatar_url":"https://github.com/neurodata.png","language":"Matlab","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Multiscale Generalized Correlation\n\n- [Repo Contents](#repo-contents)\n- [MATLAB](#matlab)\n- [R](#R)\n\nFor pseudocode for all algorithms, see Appendix of draft in `Draft`.\n\n\n## Repo Contents:\n\n- [**Code**](https://github.com/neurodata-papers/MGC/tree/master/Code): folder containing MATLAB \u0026 R code to reproduce all results in the manuscript\n- [**Draft**](https://github.com/neurodata-papers/MGC/tree/master/Draft): Discovering Relationships and their Structures Across Disparate Data Modalities,\nCencheng Shen, Carey E. Priebe, Mauro Maggioni, Qing Wang, Joshua T. Vogelstein,\nsubmitted.\n- [**Figures**](https://github.com/neurodata-papers/MGC/tree/master/Figures):  all figures from the plotting code used in the draft\n- [**Data**](https://github.com/neurodata-papers/MGC/tree/master/Data):  contains the processed raw data to reproduce all results in the draft, and existing results to readily generate the figures.\n\n\n\n\n\n## MATLAB\n\n### Dependencies\n\nWe have tested in MATLAB R2017a on Windows 10 (on PC with i7 6850k and 64 GB memory) and  OSX Sierra (on MacBook Pro with 3.3 GHz Intel Core i7 and 16 GB RAM).\n\n### Installation\nAdd all folders and subfolders of this repo to the path, you can do so using the command `addpath(genpath('\u003cpath-to-repo'))`, replacing `\u003cpath-to-repo\u003e` with the path to your local copy of the repo.\n\n### Demo\nType  `run_demo`\nfor a simulation example that outputs many things including visualization of the dependency, a p-value (pMGC) of \u003c 0.05, the test statistic, and highlighted optimal scales in the multiscale significance map; it takes \u003c 10 seconds to run.\n\n### Reproduction Instruction\n\nTo reproduce the results in the manuscript, once installed, type any of the following:\n\n- `plot_all` reproduce all figures in the draft from pre-generated results\n- `run_1d_sims` runs the 1-dimensional simulations (~20 min)\n- `run_hd_sims` runs high-dimensional simulations (~60 min)\n- `run_realData` runs real data experiments (~20 min)\n\n\nNote that the default number of replicates in each experiment is set at 100, which is much smaller than the number used in the draft. This can be increased by the function argument at the cost of linearly increasing the running time.\n\n### Test on Real Data\n1. To run on any given data X and Y, compute the n times n Euclidean distance matrices C for X and D for Y respectively, then type `MGCPermutationTest(C,D)`. If the input are already two distance matrices, use them directly.\n2. The output will be the p-value, test statistic, and optimal scales. See the respective Matlab and R code for the output format.\n\n\n## R\n\n### Dependencies\n\n\nWe have tested in R v3.4.1 on Windows 10 (on PC with i7 6850k and 64 GB memory) and  OSX Sierra (on MacBook Pro with 3.3 GHz Intel Core i7 and 16 GB RAM).\n\nOn OSX, gfortan must also be installed, to do so, follow instructions from https://gcc.gnu.org/wiki/GFortranBinariesMacOS.\n\n\n### installation\n\n```\ninstall.packages('ecodist')\ninstall.packages('HHG')\ninstall.packages('energy')\ninstall.packages('SDMTools')\nsetwd(\"\u003cpath-to-repo\u003e/Code/R\")\nsource('MGCPermutationTest.R')\nsource('run_realData.R')\n```\n\nNote that `\u003cpath-to-repo\u003e` must be replaced with the path to your local copy of the repo.\n\n\n\n### Demo\n\nOnce installed, type `test=run_realData()` which takes \u003c 1 minute to run.  The output is the variable test that includes:\n- `localCorr` matrix\n- `optimalInd` vector\n- `pLocalCorr` matrix\n- `pMGC` p-value\n- `statMGC` test statistic.\n\nNote that despite of the same implementation, the R version is slightly slower than Matlab for running on the same data, due to the fact that Matlab is slightly more efficient in handling matrix computation.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneurodata%2Fmgc-paper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fneurodata%2Fmgc-paper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneurodata%2Fmgc-paper/lists"}