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:
A variable that can reasonably take on any value within a range. Examples of continuous variables include height, weight, exam scores, income, salary, etc.
A variable that is a category without a natural order. Examples of categorical variables are eye color, city of residence, type of dog, etc.
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.
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
scipy
numpy
pandas
scikit-learn
pip install relazioni
pip install .
python setup.py install
python -m pip install git+https://github.com/chicodelarosa/relazioni.git
import numpy as np
from relazioni 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
The relazioni package welcomes your expertise and enthusiasm!