Skip to main content

Python implementation of Chatterjee's Rank Correlation, its modifications, and other offshoots

Project description

Chatterjee's Xi, its Applications, and Offshoots

XicorPy is a Python package implementing Chatterjee's Xi, and its various offshoots. You can use the package with raw python objects, NumPy arrays, or Pandas DataFrames.

Please see the Documentation for an introductory tutorial and a full user guide.

Features

The package currently implements:

  1. Chatterjee's Xi from [1]
  2. Modified Xi from [2]
  3. Codependence Coefficient from [3]
  4. Feature Ordering by Conditional Independence (FOCI) for Feature Selection from [3]

Usage

The package is available on PyPI. You can install using pip: pip install xicorpy.

import xicorpy

x = [10, 8, 13, 9, 11, 14, 6, 4, 12, 7, 5]
y = [8.04, 6.95, 7.58, 8.81, 8.33, 9.96, 7.24, 4.26, 10.84, 4.82, 5.68]
xi = xicorpy.compute_xi_correlation(x, y)

xi, p_value = xicorpy.compute_xi_correlation(x, y, get_p_values=True)

Refer to the Docs for more details.

Contributing to XiCorPy

Any help with the package is greatly appreciated! Pull requests and bug reports are greatly welcome!

Citations:

  1. Chatterjee (2020). "A new coefficient of correlation"
  2. Lin and Han (2021). "On boosting the power of Chatterjee's rank correlation"
  3. Azadkia and Chatterjee (2021). "A simple measure of conditional dependence"

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

xicorpy-0.2.tar.gz (8.9 kB view details)

Uploaded Source

Built Distribution

xicorpy-0.2-py3-none-any.whl (10.3 kB view details)

Uploaded Python 3

File details

Details for the file xicorpy-0.2.tar.gz.

File metadata

  • Download URL: xicorpy-0.2.tar.gz
  • Upload date:
  • Size: 8.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.2 CPython/3.9.16 Linux/5.15.0-1037-azure

File hashes

Hashes for xicorpy-0.2.tar.gz
Algorithm Hash digest
SHA256 e47ffe311c0396d7db4e28d73440355c501dbd6f005aa88ced485d9f37410401
MD5 4e7918583459397c188d84b98f96fea8
BLAKE2b-256 b6e5ecc0e07a9ed97d089f7faf4e26498e4fa6ceb9c380a488cd7c4c1727833a

See more details on using hashes here.

File details

Details for the file xicorpy-0.2-py3-none-any.whl.

File metadata

  • Download URL: xicorpy-0.2-py3-none-any.whl
  • Upload date:
  • Size: 10.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.2 CPython/3.9.16 Linux/5.15.0-1037-azure

File hashes

Hashes for xicorpy-0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 dec4ddcae24cf5c87d6f93a918dadf75f05da5c872ddb11e1dc969f7636951b6
MD5 ae471fb9cac80fc6f5548f0fe1ac8f0a
BLAKE2b-256 13a345ce3f76accb6ca6bd8ef5dba1153793cfd24a7c1bcdaca0988f0172e02d

See more details on using hashes here.

Supported by

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