{ "info": { "author": "Ulf Hamster", "author_email": "554c46@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "[![Build Status](https://travis-ci.org/kmedian/korr.svg?branch=master)](https://travis-ci.org/kmedian/korr)\n[![Binder](https://mybinder.org/badge.svg)](https://mybinder.org/v2/gh/kmedian/korr/master?urlpath=lab)\n\n# korr\ncollection of utility functions for correlation analysis\n\n\n## Table of Contents\n* [Installation](#installation)\n* [Usage](#usage)\n* [Commands](#commands)\n* [Support](#support)\n* [Contributing](#contributing)\n\n\n## Installation\nThe `korr` [git repo](http://github.com/kmedian/korr) is available as [PyPi package](https://pypi.org/project/korr)\n\n```\npip install korr\n```\n\n\n## Usage\nCheck the [examples](https://github.com/kmedian/korr/tree/master/examples) folder for notebooks.\n\nCompute correlation matrix and its p-values\n\n* [pearson](https://github.com/kmedian/korr/blob/master/examples/pearson.ipynb) -- Pearson/Sample correlation (interval- and ratio-scale data)\n* [kendall](https://github.com/kmedian/korr/blob/master/examples/kendall.ipynb) -- Kendall's tau rank correlation (ordinal data)\n* [spearman](https://github.com/kmedian/korr/blob/master/examples/spearman.ipynb) -- Spearman rho rank correlation (ordinal data)\n* [mcc](https://github.com/kmedian/korr/blob/master/examples/mcc%20(Matthews%20correlation).ipynb) -- Matthews correlation coefficient between binary variables \n\nEDA, Dig deeper into results\n\n* [flatten](https://github.com/kmedian/korr/blob/master/examples/flatten.ipynb) -- 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_pval` and then look up the variable indicies with `flatten` afterwards.\n* [slice_yx](https://github.com/kmedian/korr/blob/master/examples/slice_yx.ipynb) -- slice a correlation and p-value matrix of a (y,X) dataset into a (y,x_i) vector and (x_j, x_k) matrices\n* [corr_vs_pval](https://github.com/kmedian/korr/blob/master/examples/corr_vs_pval.ipynb) -- Histogram to find p-value cutoffs (alpha) for a) highly correlated pairs, b) unrelated pairs, c) the mixed results. \n* [bracket_pval](hhttps://github.com/kmedian/korr/blob/master/examples/bracket_pval.ipynb) -- Histogram with more fine-grained p-value brackets. \n* [corrgram](https://github.com/kmedian/korr/blob/master/examples/corrgram.ipynb) -- Correlogram, heatmap of correlations with p-values in brackets\n\nUtility functions\n\n* [confusion](https://github.com/kmedian/korr/blob/master/examples/confusion.ipynb) -- Confusion matrix. Required for Matthews correlation (mcc) and is a bitter faster than sklearn's \n\nParameter Stability\n\n* [bootcorr](https://github.com/kmedian/korr/blob/master/examples/bootcorr.ipynb) -- Estimate multiple correlation matrices based on bootstrapped samples. From there you can assess how stable correlation estimates are (how sensitive against in-sample variation). For example, stable estimates are good candidates for modeling, and unstable correlation pairs are good candidates for P-hacking and non-reproducibility.\n\nVariable Selection, Search Functions\n\n* [mincorr](https://github.com/kmedian/korr/blob/master/examples/mincorr.ipynb) -- From all estimated correlation pairs, pick a given `n=3,5,..` of variables with low and insignificant correlations among each other. (See [binsel](https://github.com/kmedian/binsel) package for an application.)\n* `find_best` -- Find the N \"best\", i.e. high and most significant, correlations\n* `find_worst` -- Find the N \"worst\", i.e. insignificant/random and low, correlations\n* [find_unrelated](https://github.com/kmedian/korr/blob/master/examples/find_unrelated.ipynb) -- Return variable indicies of unrelated pairs (in terms of insignificant p-value)\n\n\n## Commands\n* Check syntax: `flake8 --ignore=F401`\n* Run Unit Tests: `python -W ignore -m unittest discover`\n* Remove `.pyc` files: `find . -type f -name \"*.pyc\" | xargs rm`\n* Remove `__pycache__` folders: `find . -type d -name \"__pycache__\" | xargs rm -rf`\n* Upload to PyPi with twine: `python setup.py sdist && twine upload -r pypi dist/*`\n\n\n## Debugging\n* Notebooks to profile python code are in the [profile](profile) folder\n\n\n## Support\nPlease [open an issue](https://github.com/kmedian/korr/issues/new) for support.\n\n\n## Contributing\nPlease contribute using [Github Flow](https://guides.github.com/introduction/flow/). Create a branch, add commits, and [open a pull request](https://github.com/kmedian/korr/compare/).", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/kmedian/korr", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "korr", "package_url": "https://pypi.org/project/korr/", "platform": "", "project_url": "https://pypi.org/project/korr/", "project_urls": { "Homepage": "http://github.com/kmedian/korr" }, "release_url": "https://pypi.org/project/korr/0.8.2/", "requires_dist": null, "requires_python": ">=3.6", "summary": "collection of utility functions for correlation analysis", "version": "0.8.2" }, "last_serial": 5680845, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "a7e5ed33db3d0f9ca358ccd2cce37cf6", "sha256": "c2abf9c68bb50b9bd10fb3bf82cde6f378d26293df98220853ecb052fe3cbda2" }, "downloads": -1, "filename": "korr-0.1.0.tar.gz", "has_sig": false, "md5_digest": "a7e5ed33db3d0f9ca358ccd2cce37cf6", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 3498, "upload_time": "2018-11-20T15:19:31", "url": "https://files.pythonhosted.org/packages/92/f8/aeed12447ed9e55f948a81320de783f31a8eaa82db86154413f2c5865723/korr-0.1.0.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "e636c99ceed7c5cf3cf955b7122feb14", "sha256": "cb94088487bdd6d22c3c2ac05671b3e084027f822259c1d799b6187fd8c9e938" }, "downloads": -1, "filename": "korr-0.2.0.tar.gz", "has_sig": false, "md5_digest": "e636c99ceed7c5cf3cf955b7122feb14", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 4390, "upload_time": "2018-11-20T23:02:17", "url": "https://files.pythonhosted.org/packages/2c/67/b830ae86d5a47814b7293e144d82fd89825edc0e9e4703f26ef82815b2db/korr-0.2.0.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "367858bcc0c36b70c233020221428631", "sha256": "43be362ae55aa740d6ecd6c1881810919406555f1731691dd88db0905495f22b" }, "downloads": -1, "filename": "korr-0.3.0.tar.gz", "has_sig": false, "md5_digest": "367858bcc0c36b70c233020221428631", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 5905, "upload_time": "2018-11-21T07:52:45", "url": "https://files.pythonhosted.org/packages/71/c5/651afad2c5eeccf5cbf0e776c55d2272effedf237fd451e7c27d9660d063/korr-0.3.0.tar.gz" } ], "0.4.0": [ { "comment_text": "", "digests": { "md5": "095a218cda74120c9bfd9fa6742ea873", "sha256": "b3515fe84ac8ef98607e1180e2c64b3a79083366eff8ea4f22d915179c81b9e4" }, "downloads": -1, "filename": "korr-0.4.0.tar.gz", "has_sig": false, "md5_digest": "095a218cda74120c9bfd9fa6742ea873", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 6585, "upload_time": "2018-11-27T16:37:43", "url": "https://files.pythonhosted.org/packages/58/05/b7ceaa0cd5547466f1c88889ab10e242d2f269980f4bc85cca4b8d4b1e72/korr-0.4.0.tar.gz" } ], "0.5.0": [ { "comment_text": "", "digests": { "md5": "ce588f29fd9e25a4c03e7002e3712ec3", "sha256": "2a0eea8bdc2123ff75601962715235c2501f48f4ed1cd0ba0dc3aea0039c9c7a" }, "downloads": -1, "filename": "korr-0.5.0.tar.gz", "has_sig": false, "md5_digest": "ce588f29fd9e25a4c03e7002e3712ec3", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 8549, "upload_time": "2018-11-28T08:39:29", "url": "https://files.pythonhosted.org/packages/d5/76/bdca061ca3c403ee3171e78f4a1e5a2e794145c394d99b7ef78fc0a03dc3/korr-0.5.0.tar.gz" } ], "0.5.1": [ { "comment_text": "", "digests": { "md5": "434d7fdeeef13bea1bd29ee3b5692214", "sha256": "a7ac6dd20b6c4d470b3f8501fe23ef6f313d816d91379a60032a5c256207ff7f" }, "downloads": -1, "filename": "korr-0.5.1.tar.gz", "has_sig": false, "md5_digest": "434d7fdeeef13bea1bd29ee3b5692214", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 8543, "upload_time": "2018-11-28T08:47:03", "url": "https://files.pythonhosted.org/packages/00/76/fd9ce127bdae01cec1a722087d3b3a5acb643575cf64cc707a37ffd65560/korr-0.5.1.tar.gz" } ], "0.5.2": [ { "comment_text": "", "digests": { "md5": "6c6a96d7928d62dd7d8e0d0af2353916", "sha256": "7a0f3dc8fb6a4c1ae460715c94853d914815673626b360a75fc05af4ee1f0b25" }, "downloads": -1, "filename": "korr-0.5.2.tar.gz", "has_sig": false, "md5_digest": "6c6a96d7928d62dd7d8e0d0af2353916", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 8582, "upload_time": "2018-11-28T13:44:17", "url": "https://files.pythonhosted.org/packages/ff/96/c750b4e445b78723e3232d014afb18918564a8e0c2366c991d58c06eaad6/korr-0.5.2.tar.gz" } ], "0.6.0": [ { "comment_text": "", "digests": { "md5": "2fe2678c1cd152f2254b4ca523a8d626", "sha256": "1074a6b51831fab06faf76e0091a152527d53cd4851aa75c91b178a6b6c863d1" }, "downloads": -1, "filename": "korr-0.6.0.tar.gz", "has_sig": false, "md5_digest": "2fe2678c1cd152f2254b4ca523a8d626", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 9665, "upload_time": "2018-11-28T17:37:08", "url": "https://files.pythonhosted.org/packages/95/58/bf85c7d8977726669ca4b26765b07c171f9566a9b0840b036474618e0f9b/korr-0.6.0.tar.gz" } ], "0.6.1": [ { "comment_text": "", "digests": { "md5": "f79558521b0dda7cd2c2d3ce394d92de", "sha256": "b3dfd7f2a63114187684915f6f407632d092cd1200aa973dc9b1d0b8f1e233ba" }, "downloads": -1, "filename": "korr-0.6.1.tar.gz", "has_sig": false, "md5_digest": "f79558521b0dda7cd2c2d3ce394d92de", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 1480529, "upload_time": "2019-03-19T06:49:07", "url": "https://files.pythonhosted.org/packages/2c/1e/074e14be6a6986e0bb7fa038c7d9758bd035563ec36bbeea72b38a4339a6/korr-0.6.1.tar.gz" } ], "0.7.0": [ { "comment_text": "", "digests": { "md5": "60989ae7a16f7bfa114e17da905e4f21", "sha256": "7a41dbd64e74df051e6a28a502319c11a46c9624f63ba0c6850178fc1e19c388" }, "downloads": -1, "filename": "korr-0.7.0.tar.gz", "has_sig": false, "md5_digest": "60989ae7a16f7bfa114e17da905e4f21", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 1481922, "upload_time": "2019-04-22T10:03:50", "url": "https://files.pythonhosted.org/packages/19/95/db5949f021015c2f4ef8f10c544e8b027758cff9de2aa2baa81af197b317/korr-0.7.0.tar.gz" } ], "0.8.0": [ { "comment_text": "", "digests": { "md5": "4e25a90bbb2ddb8de2949a8a0a425a89", "sha256": "8e8810f80f72deee1be5739e0d3769c5f3b1dcfd5e0a3f59d862d6dbabef5a28" }, "downloads": -1, "filename": "korr-0.8.0.tar.gz", "has_sig": false, "md5_digest": "4e25a90bbb2ddb8de2949a8a0a425a89", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 1483511, "upload_time": "2019-06-04T08:22:08", "url": "https://files.pythonhosted.org/packages/ab/3a/0de470b1a0d3320cd84eb7b26d05e0f6472465fbe4cc64519c75ff15c7bb/korr-0.8.0.tar.gz" } ], "0.8.1": [ { "comment_text": "", "digests": { "md5": "94894ebbf35f2782f17355dfb2982a8b", "sha256": "435efacd5ecf73a1544c058b09afead88cf85746fdf7ad3d89302c3944a42b96" }, "downloads": -1, "filename": "korr-0.8.1.tar.gz", "has_sig": false, "md5_digest": "94894ebbf35f2782f17355dfb2982a8b", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 1483605, "upload_time": "2019-07-02T19:40:18", "url": "https://files.pythonhosted.org/packages/91/cd/2070035fec609640e09e4af0367e64f379acc23709bdb3c5220eabf3661a/korr-0.8.1.tar.gz" } ], "0.8.2": [ { "comment_text": "", "digests": { "md5": "607b58b1c95bd79f67bb7c8aa27faadc", "sha256": "2c8c9b84b4c8ff0fd8c04d8314d57c92371a206ee88e3596804e8717dbfed780" }, "downloads": -1, "filename": "korr-0.8.2.tar.gz", "has_sig": false, "md5_digest": "607b58b1c95bd79f67bb7c8aa27faadc", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 1484097, "upload_time": "2019-08-15T06:58:55", "url": "https://files.pythonhosted.org/packages/1d/50/a30340d14726880a9efaed5728803088206d0e0e2825ad9066897d7cb06a/korr-0.8.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "607b58b1c95bd79f67bb7c8aa27faadc", "sha256": "2c8c9b84b4c8ff0fd8c04d8314d57c92371a206ee88e3596804e8717dbfed780" }, "downloads": -1, "filename": "korr-0.8.2.tar.gz", "has_sig": false, "md5_digest": "607b58b1c95bd79f67bb7c8aa27faadc", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 1484097, "upload_time": "2019-08-15T06:58:55", "url": "https://files.pythonhosted.org/packages/1d/50/a30340d14726880a9efaed5728803088206d0e0e2825ad9066897d7cb06a/korr-0.8.2.tar.gz" } ] }