Skip to main content

A Rank Aggegation Library for MCDA problems

Project description

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.

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

  1. Install
pip install pyRankMCDA
  1. Basic Example
import numpy as np
from pyRankMCDA 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)
  1. Running Multiple Methods
# Define the methods to run
methods = ['bd', 'cp', 'fky', 'md', 'pg']

# Run selected methods
df = ra.run_methods(methods)
  1. Visualization
# Plot heatmap of rankings
ra.plot_ranks_heatmap(df)

# Plot radar chart of rankings
ra.plot_ranks_radar(df)
  1. Computing Metrics
# Calculate distance and correlation metrics
d_matrix = ra.metrics(df)

# Plot metric comparisons
ra.metrics_plot(d_matrix)
  1. Try it in Colab:
  1. 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

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

pyRankMCDA-2.1.4.tar.gz (11.1 kB view details)

Uploaded Source

Built Distribution

pyRankMCDA-2.1.4-py3-none-any.whl (10.2 kB view details)

Uploaded Python 3

File details

Details for the file pyRankMCDA-2.1.4.tar.gz.

File metadata

  • Download URL: pyRankMCDA-2.1.4.tar.gz
  • Upload date:
  • Size: 11.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.10.9

File hashes

Hashes for pyRankMCDA-2.1.4.tar.gz
Algorithm Hash digest
SHA256 fb4b07c9809fe139eaeaf66c36b5377d0ea4e942b76fba113e73b2643b7748d5
MD5 704cecaf819db58feecc69cc23304864
BLAKE2b-256 bbff04b34153ba017189c1295365044cb3357224eaca120d0b82941b0da4221b

See more details on using hashes here.

File details

Details for the file pyRankMCDA-2.1.4-py3-none-any.whl.

File metadata

  • Download URL: pyRankMCDA-2.1.4-py3-none-any.whl
  • Upload date:
  • Size: 10.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.10.9

File hashes

Hashes for pyRankMCDA-2.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 a39d01198720b77d5b48df778684420893bc847d8c4cc3c2b64cf1360944aadd
MD5 ac8dff6c29db2e0b416c59973e2623d0
BLAKE2b-256 e5f90d031c8ac81982fce7a5e02c383139fe307703a19a30d8be4902a8f55d92

See more details on using hashes here.

Supported by

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