A lightweight package for strength of the relationship between two variables analysis.
Project description
Relazioni
Relazioni is a lightweight package for strength of the relationship between variables analysis.
Documentation: https://chicodelarosa.com/relazioni
Source code: https://github.com/chicodelarosa/relazioni
Bug reports: https://github.com/chicodelarosa/relazioni/issues
It provides easy to use functions for measuring the relationship between variables of the following natures:
Two Continuous
A variable that can reasonably take on any value within a range. Examples of continuous variables include height, weight, exam scores, income, salary, etc.
Two Categorical
A variable that is a category without a natural order. Examples of categorical variables are eye color, city of residence, type of dog, etc.
At least One Ordinal
A variable with categories that have an inherent order. For instance, education level (GDE/Bachelors/Masters/PhD), income level (if grouped into high/medium/low) etc.
One Binary and One Continuous
A variable that is a category with only two possible values. Examples of binary variables include gender (male/female) or any True/False or Yes/No variable.
Relazioni currently supports 8 different association functions for investigating the relationship between variables in the following cases:
- Two Continuous and Covariates
- Partial Correlation (R)
- Two Continuous and No Covariates
- Pearson Correlation
- Two Categorical and Two Values per Variable
- Phi Coefficient
- Two Categorical and More than Two Values per Variable
- Cramer’s V
- Theil's U
- At Least One Ordinal
- Kendall’s Tau
- Spearman’s Rho
- One Continuous and One Binary
- Point-biserial Correlation
Requirements
scipy
numpy
pandas
scikit-learn
Installation
Installing via pip
pip install .
Installing via setup.py
python setup.py install
Installing via Git
python -m pip install git+https://github.com/chicodelarosa/relazioni.git
Example
import numpy as np
from relationships import associations
v1, v2 = np.array([1, 1, 2]), np.array([1, 1, 2])
matth_corr = associations.matthews_corr(v1, v2)
print(matth_corr) # 1.0
v1, v2 = np.array([1, 1, 2]), np.array([2, 1, 2])
matth_corr = associations.matthews_corr(v1, v2)
print(matth_corr) # 0.5
Call for Contributions
The relationships package welcomes your expertise and enthusiasm!
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
File details
Details for the file relazioni-0.0.1.tar.gz.
File metadata
- Download URL: relazioni-0.0.1.tar.gz
- Upload date:
- Size: 6.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.4 CPython/3.6.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
16e9a8741c45316c176f8d2a9080a065d27d1f1473f2c6899cb219a77aab7622
|
|
| MD5 |
e045a5699fb54b30d8ba8d19cc912afb
|
|
| BLAKE2b-256 |
8b13688a082eb40a90004f65f5302328444605eb2a8d7888932d7841826d419d
|