pyRankMCDA


NamepyRankMCDA JSON
Version 2.1.4 PyPI version JSON
download
home_pagehttps://github.com/Valdecy/pyRankMCDA
SummaryA Rank Aggegation Library for MCDA problems
upload_time2024-11-12 23:06:02
maintainerNone
docs_urlNone
authorValdecy Pereira
requires_pythonNone
licenseGNU
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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

```bash
pip install pyRankMCDA
```

2. Basic Example

```python
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)
```

3. Running Multiple Methods

```python
# Define the methods to run
methods = ['bd', 'cp', 'fky', 'md', 'pg']

# Run selected methods
df = ra.run_methods(methods)
```

4. Visualization

```python
# Plot heatmap of rankings
ra.plot_ranks_heatmap(df)

# Plot radar chart of rankings
ra.plot_ranks_radar(df)
```

5. Computing Metrics

```python
# Calculate distance and correlation metrics
d_matrix = ra.metrics(df)

# Plot metric comparisons
ra.metrics_plot(d_matrix)
```

6. Try it in **Colab**:

- Example: ([ Colab Demo ](https://colab.research.google.com/drive/1qtS4kRMN_NdG0yer8UcN196bWnTM-dlI?usp=sharing))


7. Others
- [3MOAHP](https://github.com/Valdecy/Method_3MOAHP) - Inconsistency Reduction Technique for AHP and Fuzzy-AHP Methods
- [pyDecision](https://github.com/Valdecy/pyDecision) - A library for many MCDA methods
- [pyMissingAHP](https://github.com/Valdecy/pyMissingAHP) - A Method to Infer AHP Missing Pairwise Comparisons
- [ELECTRE-Tree](https://github.com/Valdecy/ELECTRE-Tree) - Algorithm to infer the ELECTRE Tri-B method parameters
- [Ranking-Trees](https://github.com/Valdecy/Ranking-Trees) - Algorithm to infer the ELECTRE II, III, IV and PROMETHEE I, II, III, IV method parameters
- [EC-PROMETHEE](https://github.com/Valdecy/ec_promethee) -  A Committee Approach for Outranking Problems
- [MCDM Scheduler](https://github.com/Valdecy/mcdm_scheduler) -  A MCDM approach for Scheduling Problems

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/Valdecy/pyRankMCDA",
    "name": "pyRankMCDA",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": null,
    "author": "Valdecy Pereira",
    "author_email": "valdecy.pereira@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/bb/ff/04b34153ba017189c1295365044cb3357224eaca120d0b82941b0da4221b/pyRankMCDA-2.1.4.tar.gz",
    "platform": null,
    "description": "# pyRankMCDA\r\n\r\n## Introduction\r\n\r\n**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.\r\n\r\n## Features\r\n\r\n- **Multiple Rank Aggregation Methods**:\r\n  - Borda Method\r\n  - Copeland Method\r\n  - Footrule Rank Aggregation\r\n  - Fast Footrule Rank Aggregation\r\n  - Kemeny-Young Method\r\n  - Fast Kemeny-Young\r\n  - Median Rank Aggregation\r\n  - PageRank Algorithm\r\n  - Plackett-Luce Model Aggregation\r\n  - Reciprocal Rank Fusion\r\n  - Schulze Method\r\n\r\n- **Distance and Correlation Metrics**:\r\n  - Cayley Distance \r\n  - Footrule Distance\r\n  - Kendall Tau Distance\r\n  - Kendall Tau Correlation\r\n  - Spearman Rank Correlation\r\n\r\n- **Visualization Tools**:\r\n  - Heatmaps of rankings\r\n  - Radar charts comparing rankings from different methods\r\n  - Multidimensional Scaling (MDS) plots for visualizing distances between ranking methods\r\n\r\n## Usage\r\n1. Install\r\n\r\n```bash\r\npip install pyRankMCDA\r\n```\r\n\r\n2. Basic Example\r\n\r\n```python\r\nimport numpy as np\r\nfrom pyRankMCDA import rank_aggregation\r\n\r\n# Example rankings from different methods\r\n\r\nranks = np.array([\r\n    [1, 2, 3],\r\n    [2, 1, 3],\r\n    [3, 2, 1]\r\n])\r\n\r\n# Initialize rank aggregation object\r\nra = rank_aggregation(ranks)\r\n\r\n# Run Borda method\r\nborda_rank = ra.borda_method(verbose = True)\r\n```\r\n\r\n3. Running Multiple Methods\r\n\r\n```python\r\n# Define the methods to run\r\nmethods = ['bd', 'cp', 'fky', 'md', 'pg']\r\n\r\n# Run selected methods\r\ndf = ra.run_methods(methods)\r\n```\r\n\r\n4. Visualization\r\n\r\n```python\r\n# Plot heatmap of rankings\r\nra.plot_ranks_heatmap(df)\r\n\r\n# Plot radar chart of rankings\r\nra.plot_ranks_radar(df)\r\n```\r\n\r\n5. Computing Metrics\r\n\r\n```python\r\n# Calculate distance and correlation metrics\r\nd_matrix = ra.metrics(df)\r\n\r\n# Plot metric comparisons\r\nra.metrics_plot(d_matrix)\r\n```\r\n\r\n6. Try it in **Colab**:\r\n\r\n- Example: ([ Colab Demo ](https://colab.research.google.com/drive/1qtS4kRMN_NdG0yer8UcN196bWnTM-dlI?usp=sharing))\r\n\r\n\r\n7. Others\r\n- [3MOAHP](https://github.com/Valdecy/Method_3MOAHP) - Inconsistency Reduction Technique for AHP and Fuzzy-AHP Methods\r\n- [pyDecision](https://github.com/Valdecy/pyDecision) - A library for many MCDA methods\r\n- [pyMissingAHP](https://github.com/Valdecy/pyMissingAHP) - A Method to Infer AHP Missing Pairwise Comparisons\r\n- [ELECTRE-Tree](https://github.com/Valdecy/ELECTRE-Tree) - Algorithm to infer the ELECTRE Tri-B method parameters\r\n- [Ranking-Trees](https://github.com/Valdecy/Ranking-Trees) - Algorithm to infer the ELECTRE II, III, IV and PROMETHEE I, II, III, IV method parameters\r\n- [EC-PROMETHEE](https://github.com/Valdecy/ec_promethee) -  A Committee Approach for Outranking Problems\r\n- [MCDM Scheduler](https://github.com/Valdecy/mcdm_scheduler) -  A MCDM approach for Scheduling Problems\r\n",
    "bugtrack_url": null,
    "license": "GNU",
    "summary": "A Rank Aggegation Library for MCDA problems",
    "version": "2.1.4",
    "project_urls": {
        "Homepage": "https://github.com/Valdecy/pyRankMCDA"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e5f90d031c8ac81982fce7a5e02c383139fe307703a19a30d8be4902a8f55d92",
                "md5": "ac8dff6c29db2e0b416c59973e2623d0",
                "sha256": "a39d01198720b77d5b48df778684420893bc847d8c4cc3c2b64cf1360944aadd"
            },
            "downloads": -1,
            "filename": "pyRankMCDA-2.1.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "ac8dff6c29db2e0b416c59973e2623d0",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 10172,
            "upload_time": "2024-11-12T23:06:00",
            "upload_time_iso_8601": "2024-11-12T23:06:00.446157Z",
            "url": "https://files.pythonhosted.org/packages/e5/f9/0d031c8ac81982fce7a5e02c383139fe307703a19a30d8be4902a8f55d92/pyRankMCDA-2.1.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "bbff04b34153ba017189c1295365044cb3357224eaca120d0b82941b0da4221b",
                "md5": "704cecaf819db58feecc69cc23304864",
                "sha256": "fb4b07c9809fe139eaeaf66c36b5377d0ea4e942b76fba113e73b2643b7748d5"
            },
            "downloads": -1,
            "filename": "pyRankMCDA-2.1.4.tar.gz",
            "has_sig": false,
            "md5_digest": "704cecaf819db58feecc69cc23304864",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 11052,
            "upload_time": "2024-11-12T23:06:02",
            "upload_time_iso_8601": "2024-11-12T23:06:02.074621Z",
            "url": "https://files.pythonhosted.org/packages/bb/ff/04b34153ba017189c1295365044cb3357224eaca120d0b82941b0da4221b/pyRankMCDA-2.1.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-12 23:06:02",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Valdecy",
    "github_project": "pyRankMCDA",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "pyrankmcda"
}
        
Elapsed time: 2.50978s