pyRankMCDA
Introduction
pyRankMCDA is a Python library designed for rank aggregation in multi-criteria decision analysis (MCDA). It provides implementations of classical and modern rank aggregation methods, allowing users to combine multiple rankings into a single consensus ranking. This is particularly useful in fields like decision science, information retrieval, and any domain where synthesizing different ordered lists is necessary.
Citation
PEREIRA, V.; BASILIO, M.P.; FATIH Y. (2026). Unifying Multiple MCDA Rankings: Aggregation of Rankings through Methodological and Computational Perspectives. International Journal of Information Technology & Decision Making. doi: https://www.worldscientific.com/doi/10.1142/S0219622026500525
Features
-
Multiple Rank Aggregation Methods:
- Borda Method
- Copeland Method
- Footrule Rank Aggregation
- Fast Footrule Rank Aggregation
- Kemeny-Young Method
- Fast Kemeny-Young
- Median Rank Aggregation
- PageRank Algorithm
- Plackett-Luce Model Aggregation
- Reciprocal Rank Fusion
- Schulze Method
-
Distance and Correlation Metrics:
- Cayley Distance
- Footrule Distance
- Kendall Tau Distance
- Kendall Tau Correlation
- Spearman Rank Correlation
-
Visualization Tools:
- Heatmaps of rankings
- Radar charts comparing rankings from different methods
- Multidimensional Scaling (MDS) plots for visualizing distances between ranking methods
Usage
- Install
pip install pyRankMCDA
- Basic Example
import numpy as np
from pyRankMCDA.algorithm import rank_aggregation
# Example rankings from different methods
ranks = np.array([
[1, 2, 3],
[2, 1, 3],
[3, 2, 1]
])
# Initialize rank aggregation object
ra = rank_aggregation(ranks)
# Run Borda method
borda_rank = ra.borda_method(verbose = True)
- Running Multiple Methods
# Define the methods to run
methods = ['bd', 'cp', 'fky', 'md', 'pg']
# Run selected methods
df = ra.run_methods(methods)
- Visualization
# Plot heatmap of rankings
ra.plot_ranks_heatmap(df)
# Plot radar chart of rankings
ra.plot_ranks_radar(df)
- Computing Metrics
# Calculate distance and correlation metrics
d_matrix = ra.metrics(df)
# Plot metric comparisons
ra.metrics_plot(d_matrix)
- Try it in Colab:
- Example: ( Colab Demo )
- Others
- 3MOAHP - Inconsistency Reduction Technique for AHP and Fuzzy-AHP Methods
- pyDecision - A library for many MCDA methods
- pyMissingAHP - A Method to Infer AHP Missing Pairwise Comparisons
- ELECTRE-Tree - Algorithm to infer the ELECTRE Tri-B method parameters
- Ranking-Trees - Algorithm to infer the ELECTRE II, III, IV and PROMETHEE I, II, III, IV method parameters
- EC-PROMETHEE - A Committee Approach for Outranking Problems
- MCDM Scheduler - A MCDM approach for Scheduling Problems
Metadata
Release files for pyrankmcda 2.1.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pyrankmcda-2.1.8.tar.gz | 11.4 kB | Without provenance | Details for pyrankmcda-2.1.8.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pyrankmcda-2.1.8-py3-none-any.whl | Python 3 | none | any | Details for pyrankmcda-2.1.8-py3-none-any.whl |
Total release size: 21.7 kB
Release files / pyrankmcda-2.1.8.tar.gz
| Download URL | pyrankmcda-2.1.8.tar.gz |
|---|---|
| Size | 11.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
df1f647eebe677eb636407825cf3f26cffb52a22b9c367d25df701807393f05a
|
|
BLAKE2b-256 checksum How to use checksums |
8c0d83175433d27be3c75baa3ad72448b14eead69db131ea3f23422d55518244
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.10.9
|
Release files / pyrankmcda-2.1.8-py3-none-any.whl
| Download URL | pyrankmcda-2.1.8-py3-none-any.whl |
|---|---|
| Size | 10.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
114c195e741cdb9c88489f3f00457f7241b61fb4154089b4fdc4b5a926b4e6d0
|
|
BLAKE2b-256 checksum How to use checksums |
a8eda97b1180eab097cbcbc5a8e9298d8b2c216c8f8b245165aebfce3f3d3927
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.10.9
|
Security for pyrankmcda 2.1.8
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.