weighted_rank_correlation
An implementation weighted rank correlation, that allows to be more flexibly tuned.
Science Score: 57.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 2 DOI reference(s) in README -
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (6.7%) to scientific vocabulary
Keywords
Repository
An implementation weighted rank correlation, that allows to be more flexibly tuned.
Statistics
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 2
- Releases: 0
Topics
Metadata Files
README.md
Weighted Rank Correlation
An implementation of Henzgens and Hüllermeiers weighted rank correlation coefficient scaled gamma, provided by Hoang Cong Thanh @Marmalada1.
Installation
The project can be installed with poetry
bash
poetry add git+https://github.com/KIuML/weighted_rank_correlation.git
Usage
To perform a calculation run the function gamma_corr(x,y) with x and y being the two rankings to compare.
Consider the following minimal example for usage:
```python from gammacorrelation import genweights, gamma_corr
rankinga = [1, 2, 3, 4, 5] rankingb = [5, 4, 3, 2, 1]
print(gammacorr(rankinga, ranking_b, weights="top")) ```
This example computes the gamma correlation coefficient for the predifined top weighting function, that emphasizes changes in the upper part of the rankings.
Custom weighting functions can be defined in terms of a vector of length n - 1. The weight at position i describes the degree to which rank position i and i + 1 are distinguished from each other. For example, a linearly inreasing weighting (i.e. emphasizing changes at the bottom of the rankings) can be implemented as follows:
```python from gammacorrelation import genweights, gamma_corr
rankinga = [1, 2, 3, 4, 5] rankingb = [3, 2, 5, 4, 1] w = np.linspace(1, .25, 4)
print(gammacorr(rankinga, ranking_b, weights=w)) ```
Owner
- Name: KIuML
- Login: KIuML
- Kind: organization
- Repositories: 3
- Profile: https://github.com/KIuML
Citation (CITATION.cff)
cff-version: 1.2.0 message: "If you use this software, please cite it as below." authors: - family-names: "Henzgen" given-names: "Sascha" - family-names: "Hüllermeier" given-names: "Eyke" orcid: "https://orcid.org/0000-0002-9944-4108" title: "Weighting by Tying: A New Approach to Weighted Rank Correlation" url: "https://arxiv.org/abs/2308.10622"
GitHub Events
Total
Last Year
Dependencies
- pytest ^7.4.0 develop
- numpy ^1.25.2
- python >=3.11,<3.13
- scipy ^1.11.2