collection of utility functions for correlation analysis
Project description
korr
collection of utility functions for correlation analysis
Table of Contents
Installation
The korr git repo is available as PyPi package
pip install korr
Usage
Check the examples folder for notebooks.
Compute correlation matrix and its p-values
- pearson -- Pearson/Sample correlation (interval- and ratio-scale data)
- kendall -- Kendall's tau rank correlation (ordinal data)
- spearman -- Spearman rho rank correlation (ordinal data)
EDA, Dig deeper into results
- flatten -- A table (pandas) with one row for each correlation pairs with the variable indicies, corr., p-value. For example, try to find "good" cutoffs with
corr_vs_pvaland then look up the variable indicies withflattenafterwards. - corr_vs_pval -- Histogram to find p-value cutoffs (alpha) for a) highly correlated pairs, b) unrelated pairs, c) the mixed results.
- bracket_pval -- Histogram with more fine-grained p-value brackets.
Utility functions
- find_unrelated -- Return variable indicies of unrelated pairs (in terms of insignificant p-value)
Commands
- Check syntax:
flake8 --ignore=F401 - Run Unit Tests:
python -W ignore -m unittest discover - Remove
.pycfiles:find . -type f -name "*.pyc" | xargs rm - Remove
__pycache__folders:find . -type d -name "__pycache__" | xargs rm -rf - Upload to PyPi with twine:
python setup.py sdist && twine upload -r pypi dist/*
Debugging
- Notebooks to profile python code are in the profile folder
Support
Please open an issue for support.
Contributing
Please contribute using Github Flow. Create a branch, add commits, and open a pull request.
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
korr-0.3.0.tar.gz
(5.9 kB
view details)
File details
Details for the file korr-0.3.0.tar.gz.
File metadata
- Download URL: korr-0.3.0.tar.gz
- Upload date:
- Size: 5.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.5.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
43be362ae55aa740d6ecd6c1881810919406555f1731691dd88db0905495f22b
|
|
| MD5 |
367858bcc0c36b70c233020221428631
|
|
| BLAKE2b-256 |
71c5651afad2c5eeccf5cbf0e776c55d2272effedf237fd451e7c27d9660d063
|