A set of tools in Python for multiscale graph correlation and other statistical tests
Project description
The R version is available on CRAN and https://github.com/neurodata/mgc-r. The MATLAB version is available at https://github.com/neurodata/mgc-matlab.
mgcpy
mgcpy
is a Python package containing tools for independence testing using multiscale graph correlation and other statistical tests, that is capable of dealing with high dimensional and multivariate data.
- Overview
- Documentation
- System Requirements
- Installation Guide
- Setting up the development environment
- License
- Issues
Overview
mgcpy
aims to be a comprehensive independence testing package including all of the commonly used independence tests as mentioned above and additional functionality such as two sample independence testing and a novel random forest-based independence test. These tests are not only included to benchmark MGC but to have a convenient location for users if they would prefer to utilize those tests instead. The package utilizes a simple class structure to enhance usability while also allowing easy extension of the package for developers. The package can be installed on all major platforms (e.g. BSD, GNU/Linux, OS X, Windows)from Python Package Index (PyPI) and GitHub.
Documenation
The official documentation with usage is at: https://mgc.neurodata.io/ ReadTheDocs: https://mgcpy.readthedocs.io/en/latest/
System Requirements
Hardware requirements
mgcpy
package requires only a standard computer with enough RAM to support the in-memory operations.
Software requirements
OS Requirements
This package is supported for macOS and Linux. The package has been tested on the following systems:
- macOS: Mojave (10.14.1)
- Linux: Ubuntu 16.04
Python Dependencies
mgcpy
mainly depends on the Python scientific stack.
numpy
scipy
Cython
scikit-learn
pandas
seaborn
Installation Guide:
Install from PyPi
pip3 install mgcpy
Install from Github
git clone https://github.com/neurodata/mgcpy
cd mgcpy
python3 setup.py install
sudo
, if requiredpython3 setup.py build_ext --inplace # for cython
, if you want to test in-place, first execute this
Setting up the development environment:
-
To build image and run from scratch:
- Install docker
- Build the docker image,
docker build -t mgcpy:latest .
- This takes 10-15 mins to build
- Launch the container to go into mgcpy's dev env,
docker run -it --rm --name mgcpy-env mgcpy:latest
-
Pull image from Dockerhub and run:
docker pull tpsatish95/mgcpy:latest
ordocker pull tpsatish95/mgcpy:development
docker run -it --rm -p 8888:8888 --name mgcpy-env tpsatish95/mgcpy:latest
-
To run demo notebooks (from within Docker):
cd demos
jupyter notebook --ip 0.0.0.0 --no-browser --allow-root
- Then copy the url it generates, it looks something like this:
http://(0de284ecf0cd or 127.0.0.1):8888/?token=e5a2541812d85e20026b1d04983dc8380055f2d16c28a6ad
- Edit this:
(0de284ecf0cd or 127.0.0.1)
to:127.0.0.1
, in the above link and open it in your browser - Then open
mgc.ipynb
-
To mount/load local files into docker container:
- Do
docker run -it --rm -v <local_dir_path>:/root/workspace/ -p 8888:8888 --name mgcpy-env tpsatish95/mgcpy:latest
, replace<local_dir_path>
with your local dir path. - Do
cd ../workspace
when you are inside the container to view the mounted files. The mgcpy package code will be in/root/code
directory.
- Do
MGC Algorithm's Flow
Power Curves
- Recreated Figure 2 in https://arxiv.org/abs/1609.05148, with the addition of MDMR and Fast MGC
License
This project is covered under the Apache 2.0 License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for mgcpy-0.3.0-py3.7-macosx-10.7-x86_64.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1719699930bf4214efc38117c2066d5deea9d1effb6bab9ffda9997d166bc4ed |
|
MD5 | 72f085e1068f9fc530aecdeb70326b5e |
|
BLAKE2b-256 | b5417d45046604be05b72cc46398a543789d318382e8c4be5a368bb23fc2572e |
Hashes for mgcpy-0.3.0-py3.6-macosx-10.14-x86_64.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 85d6e877dee500803c0b2826a05d7d9927a6ad0bb5826385c7f1cbca5da1ea38 |
|
MD5 | 554d86bf9f00796be4f665bd7b204777 |
|
BLAKE2b-256 | 55f6d0902f8e54868abe0363a96fadbae1da42de075dc647e9b743220be2736a |
Hashes for mgcpy-0.3.0-cp36-cp36m-macosx_10_14_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1606388d0b547c78d023c0ee7bf214d2c735d95e2de88518afbbe07a55a287da |
|
MD5 | b19aa3dbc4cc5d8103a0b573692d5a68 |
|
BLAKE2b-256 | 49f9e402a82e999338ed8f86f14cf52254fa3cb5862d8bde0ac6039d515f98b5 |