Skip to main content

DiProPerm for high dimensional hypothesis testing.

Project description

DiProPerm

author: Iain Carmichael_

Additional documentation, examples and code revisions are coming soon. For questions, issues or feature requests please reach out to Iain: iain@unc.edu.

Overview

This package implements Direction-Projection-Permutation for High Dimensional Hypothesis Tests (DiPoPerm). For details see Wei et al, 2016 (paper link, arxiv link). DiProPerm "rigorously assesses whether a binary linear classifier is detecting statistically significant differences between two high-dimensional distributions."

Wei, S., Lee, C., Wichers, L., & Marron, J. S. (2016). Direction-projection-permutation for high-dimensional hypothesis tests. Journal of Computational and Graphical Statistics, 25(2), 549-569.

Installation

The diproperm package can be installed via pip or github. This package is currently only tested in python 3.6.

::

pip install diproperm

::

git clone https://github.com/idc9/diproperm.git
python setup.py install

Example

.. code:: python

from sklearn.datasets import make_blobs
import numpy as np
import matplotlib.pyplot as plt
# %matplotlib inline

from diproperm.DiProPerm import DiProPerm

# toy binary class dataset (two isotropic Gaussians)
X, y = make_blobs(n_samples=100, n_features=2, centers=2, cluster_std=2)

# DiProPerm with mean difference classifier, mean difference summary
# statistic, and 1000 permutation samples.
dpp = DiProPerm(B=1000, stat='md', clf='md')
dpp.fit(X, y)

dpp.test_stats_['md']

.. code:: python

{'Z': 11.704865481794599,
 'cutoff_val': 1.2678333596648679,
 'obs': 4.542253375623943,
 'pval': 0.0,
 'rejected': True}

.. code:: python

dpp.hist('md')

.. image:: doc/figures/dpp_hist.png

For more example code see these example notebooks_.

Help and Support

Additional documentation, examples and code revisions are coming soon. For questions, issues or feature requests please reach out to Iain: iain@unc.edu.

Documentation ^^^^^^^^^^^^^

The source code is located on github: https://github.com/idc9/diproperm

Testing ^^^^^^^

Testing is done using nose.

Contributing ^^^^^^^^^^^^

We welcome contributions to make this a stronger package: data examples, bug fixes, spelling errors, new features, etc.

.. _Iain Carmichael: https://idc9.github.io/ .. _paper link: https://www.tandfonline.com/doi/abs/10.1080/10618600.2015.1027773 .. _arxiv link: https://arxiv.org/pdf/1304.0796.pdf .. _these example notebooks: https://github.com/idc9/diproperm/tree/master/doc

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

diproperm-0.0.3.tar.gz (11.1 kB view details)

Uploaded Source

Built Distribution

diproperm-0.0.3-py2.py3-none-any.whl (11.1 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file diproperm-0.0.3.tar.gz.

File metadata

  • Download URL: diproperm-0.0.3.tar.gz
  • Upload date:
  • Size: 11.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.18.4 setuptools/40.5.0 requests-toolbelt/0.8.0 tqdm/4.19.4 CPython/3.6.1

File hashes

Hashes for diproperm-0.0.3.tar.gz
Algorithm Hash digest
SHA256 3883d012fd4241d106eff2688d420ed1673e402d2b9682a74d9e3ddfae3734bc
MD5 2e5f1184c4993b3524100e0b9d68d92e
BLAKE2b-256 a4eddef54c0310271b81df8a6a3cbf7258a41efb712be46e50e67e54a934fa08

See more details on using hashes here.

File details

Details for the file diproperm-0.0.3-py2.py3-none-any.whl.

File metadata

  • Download URL: diproperm-0.0.3-py2.py3-none-any.whl
  • Upload date:
  • Size: 11.1 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.18.4 setuptools/40.5.0 requests-toolbelt/0.8.0 tqdm/4.19.4 CPython/3.6.1

File hashes

Hashes for diproperm-0.0.3-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 5f04a32d81cfa82481b79ad85f1b073501293bfa584bddf95957d94a71fec1c1
MD5 e3c73ef0babedda1aa7ff0147602bfe7
BLAKE2b-256 01e0ba15821ceb75fe607cf65cfd8769995553c1abe74dba6c3d50cd9b2ce6ee

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page