# BayesMCDM: Bayesian Multi-Criteria Decision-Making Toolkit <img src="https://raw.githubusercontent.com/Majeed7/BayesMCDM/main/figures/logo.png" alt="bayesmcdm_logo" align="right" height="200px"/>
[](https://badge.fury.io/py/bayesmcdm)
[](https://opensource.org/licenses/MIT)
<!-- [](https://github.com/majidmohammadi/bayesmcdm/actions/workflows/tests.yml) -->
<!-- [](https://coveralls.io/github/majidmohammadi/bayesmcdm?branch=main) -->
<!-- [](https://bayesmcdm.readthedocs.io/en/latest/?badge=latest) -->
[](https://pypi.org/project/BayesMCDM)
[](https://pypi.org/project/bayesmcdm)
[](https://pepy.tech/project/bayesmcdm)
[](https://github.com/psf/black)
[](https://github.com/Majeed7/bayesmcdm/issues)
[](https://github.com/Majeed7/bayesmcdm/commits/main)
BayesMCDM is a Python library for Bayesian modeling of various multi-criteria decision-making (MCDM) methods. This toolkit enables robust, probabilistic analysis of decision problems by incorporating uncertainty in preferences and criteria weights. **The project is under active development**—expect more models and functionalities to be added over time.
**You can solve your decision problems directly in your browser—no software installation needed.**
## Supported Preference Types
BayesMCDM currently supports several types of preference formats for each method.
Support for **group aggregation** of preferences and **decision-maker clustering** is available or under development for these formats, enabling analysis of collective decisions and identification of groups with homogeneous preferences.
- **Standard (crisp) scale (e.g., 1-9 or any other crisp scale)**
*Fully implemented, tested, and ready for use.*
- **Interval preferences**
*Under construction.*
- **Triangular fuzzy preferences**
*Under construction.*
- **Gaussian (normal) preferences**
*Under construction.*
## Supported Methods
The following methods are supported, each with an interactive Google Colab link. These links open ready-to-run notebooks containing example scripts for each method. You can enter your own data and solve your MCDM problem directly in your browser—no installation required.
### 1. Analytic Hierarchy Process (AHP)
AHP is a structured technique for organizing and analyzing complex decisions, based on pairwise comparisons among all criteria.
- **Standard scale (crisp 1-9):**
- [Aggregation](https://colab.research.google.com/drive/1DLjKhuP29mEiDufejISw8mAMg0MRTIca#scrollTo=c34095ea)
- [Clustering](https://drive.google.com/file/d/1JkFNUtagwvCac2Uqh86Je2vfSa2Wil1F/view?usp=sharing)
### 2. Best-Worst Method (BWM)
BWM uses the best and worst criteria to derive optimal weights through pairwise comparisons.
- **Standard scale (crisp 1-9):**
- [Aggregation](https://colab.research.google.com/drive/12X4of4jk5M9mkwQOPehih9XLm7tBkhnL)
- [Clustering](https://drive.google.com/file/d/17NRtP7-YXnwl_QcKM31jT2u9VKm90es7/view?usp=sharing)
### 3. SWING Method
The SWING method elicits weights by asking decision-makers to "swing" criteria from worst to best, reflecting their relative importance.
- **Standard scale (crisp):**
- [Aggregation](https://colab.research.google.com/drive/13KPG9WkHnUrYKdAZq5IJAEkqQHD5izHx?usp=drive_open)
- [Clustering](https://colab.research.google.com/drive/13KPG9WkHnUrYKdAZq5IJAEkqQHD5izHx?usp=drive_open)
### 4. Point Allocation
Point Allocation allows decision-makers to distribute a fixed number of points among criteria to indicate their importance.
- **Standard scale (crisp):**
- [Aggregation](https://colab.research.google.com/drive/1Dh6AB3kCa1pkXdkiKzKDMix6_1GoJBw-?usp=drive_open)
- [Clustering](https://drive.google.com/file/d/1oJ4q36DVY1ZYDZWMmHWgzwkGv54i_hUb/view?usp=sharing)
### 5. Weight Analyzer
The Weight Analyzer provides tools for analyzing the weights (and not preferences) that are computed by an MCDM method.
- **Standard scale (weights):**
- [Aggregation](https://colab.research.google.com/drive/1148-72AHpfxGhfimLCjs-84prgoQ0wlr#scrollTo=GbxNVoSK4Ft9)
- [Clustering](https://colab.research.google.com/drive/1vnOkOfGZX5782yzlLTQqEPEbncbmLoV4?usp=drive_open#scrollTo=r2TdKUNtSTDm)
## Visualization
BayesMCDM offers several visualization tools to help interpret Bayesian results:
### Credal Ranking
<!--  -->
<p align="center">
<img src="https://raw.githubusercontent.com/Majeed7/BayesMCDM/main/figures/credal_ranking.png" alt="Weight Distribution example" height="500px"/>
</p>
*Figure: Example of a credal ranking plot showing the probability of each criterion being more important than another.*
**Credal ranking** visualizes the probabilistic ranking of criteria, showing the likelihood of each criterion occupying each rank based on the posterior weight distributions. This helps in understanding the robustness and uncertainty of the ranking outcomes.
### Weight Distributions
<p align="center">
<img src="https://raw.githubusercontent.com/Majeed7/BayesMCDM/main/figures/ridge_plot.png" alt="Weight Distribution example" height="500px"/>
</p>
* Figure: Example of weight distributions *
**Weight distributions** plots display the full posterior distributions of criteria weights, allowing users to assess uncertainty, variability, and the impact of preference types on the final weights.
## PyPI Package & Installation
BayesMCDM is available as a PyPI package. You can install it directly using pip:
```bash
pip install bayesmcdm
```
After installation, you can use BayesMCDM in your Python scripts or Jupyter notebooks. Here is a minimal example (from the AHP Aggregation notebook) to get you started:
```python
import numpy as np
from BayesMCDM import AHP
# Define the PCM array (example for 5 criteria, 5 decision makers)
PCM = [
[
[1, 3, 5, 4, 7],
[1/3, 1, 3, 2, 5],
[1/5, 1/3, 1, 1/2, 3],
[1/4, 1/2, 2, 1, 3],
[1/7, 1/5, 1/3, 1/3, 1],
],
[
[1, 4, 3, 5, 8],
[1/4, 1, 4, 3, 6],
[1/3, 1/4, 1, 1, 5],
[1/5, 1/3, 1, 1, 7],
[1/8, 1/6, 1/5, 1/7, 1],
],
# ... (other decision makers' PCMs) ...
]
criteria_names = ["C1", "C2", "C3", "C4", "C5"]
# Initialize and run the Bayesian AHP model
ahp = AHP.StandardAHP(PCM=PCM)
ahp.sampling()
```
See the example notebooks for more advanced usage, visualization, and group decision-making features.
## License
This project is licensed under the MIT License.
---
Built by Majid Mohammadi
Raw data
{
"_id": null,
"home_page": null,
"name": "BayesMCDM",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": "Majid Mohammadi <majid.mohammadi690@gmail.com>",
"keywords": "python, Multi Criteria Decision Making (MCDM), Bayesian, credal ranking, Analytic Hierarchy Process (AHP), Best Worst Method (BWM), SWING, Point Allocation, Weight Aggregation, Bayesian Inference, Decision Analysis, Decision Support Systems, Decision Making, Group Decision Making, Group aggregation, group clustering, Interval preferences, Preference modeling, Preference aggregation, Preference elicitation, Gaussian number preferences, Triangular number preferences, Interval number preferences, Fuzzy number preferences, probabilistic ranking, probabilistic decision making, probabilistic preference modeling, probabilistic group decision making, probabilistic group aggregation, probabilistic group clustering, correlation analysis, correlation-based decision making, correlation-based preference modeling, correlation based group decision making, correlation-based group aggregation, correlation-based group clustering, criteria correlation, criteria correlation analysis",
"author": "Majid Mohammadi",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/07/7c/6f255a5691b333d630e96ff324007c6fd2bba43728c4e8c6111ffcea2256/bayesmcdm-0.1.1.59.tar.gz",
"platform": null,
"description": "# BayesMCDM: Bayesian Multi-Criteria Decision-Making Toolkit <img src=\"https://raw.githubusercontent.com/Majeed7/BayesMCDM/main/figures/logo.png\" alt=\"bayesmcdm_logo\" align=\"right\" height=\"200px\"/>\n\n[](https://badge.fury.io/py/bayesmcdm)\n[](https://opensource.org/licenses/MIT)\n<!-- [](https://github.com/majidmohammadi/bayesmcdm/actions/workflows/tests.yml) -->\n<!-- [](https://coveralls.io/github/majidmohammadi/bayesmcdm?branch=main) -->\n<!-- [](https://bayesmcdm.readthedocs.io/en/latest/?badge=latest) -->\n\n[](https://pypi.org/project/BayesMCDM)\n[](https://pypi.org/project/bayesmcdm)\n[](https://pepy.tech/project/bayesmcdm)\n\n[](https://github.com/psf/black)\n[](https://github.com/Majeed7/bayesmcdm/issues)\n[](https://github.com/Majeed7/bayesmcdm/commits/main)\n\nBayesMCDM is a Python library for Bayesian modeling of various multi-criteria decision-making (MCDM) methods. This toolkit enables robust, probabilistic analysis of decision problems by incorporating uncertainty in preferences and criteria weights. **The project is under active development**\u2014expect more models and functionalities to be added over time.\n\n**You can solve your decision problems directly in your browser\u2014no software installation needed.**\n \n \n\n## Supported Preference Types\n\nBayesMCDM currently supports several types of preference formats for each method.\n\nSupport for **group aggregation** of preferences and **decision-maker clustering** is available or under development for these formats, enabling analysis of collective decisions and identification of groups with homogeneous preferences.\n\n- **Standard (crisp) scale (e.g., 1-9 or any other crisp scale)**\n *Fully implemented, tested, and ready for use.*\n\n- **Interval preferences** \n *Under construction.*\n\n- **Triangular fuzzy preferences** \n *Under construction.*\n\n- **Gaussian (normal) preferences** \n *Under construction.*\n\n## Supported Methods\nThe following methods are supported, each with an interactive Google Colab link. These links open ready-to-run notebooks containing example scripts for each method. You can enter your own data and solve your MCDM problem directly in your browser\u2014no installation required.\n\n### 1. Analytic Hierarchy Process (AHP)\nAHP is a structured technique for organizing and analyzing complex decisions, based on pairwise comparisons among all criteria.\n- **Standard scale (crisp 1-9):**\n - [Aggregation](https://colab.research.google.com/drive/1DLjKhuP29mEiDufejISw8mAMg0MRTIca#scrollTo=c34095ea)\n - [Clustering](https://drive.google.com/file/d/1JkFNUtagwvCac2Uqh86Je2vfSa2Wil1F/view?usp=sharing)\n\n### 2. Best-Worst Method (BWM)\nBWM uses the best and worst criteria to derive optimal weights through pairwise comparisons.\n- **Standard scale (crisp 1-9):**\n - [Aggregation](https://colab.research.google.com/drive/12X4of4jk5M9mkwQOPehih9XLm7tBkhnL)\n - [Clustering](https://drive.google.com/file/d/17NRtP7-YXnwl_QcKM31jT2u9VKm90es7/view?usp=sharing)\n\n### 3. SWING Method\nThe SWING method elicits weights by asking decision-makers to \"swing\" criteria from worst to best, reflecting their relative importance.\n- **Standard scale (crisp):**\n - [Aggregation](https://colab.research.google.com/drive/13KPG9WkHnUrYKdAZq5IJAEkqQHD5izHx?usp=drive_open)\n - [Clustering](https://colab.research.google.com/drive/13KPG9WkHnUrYKdAZq5IJAEkqQHD5izHx?usp=drive_open)\n\n### 4. Point Allocation\nPoint Allocation allows decision-makers to distribute a fixed number of points among criteria to indicate their importance.\n- **Standard scale (crisp):**\n - [Aggregation](https://colab.research.google.com/drive/1Dh6AB3kCa1pkXdkiKzKDMix6_1GoJBw-?usp=drive_open)\n - [Clustering](https://drive.google.com/file/d/1oJ4q36DVY1ZYDZWMmHWgzwkGv54i_hUb/view?usp=sharing)\n\n### 5. Weight Analyzer\nThe Weight Analyzer provides tools for analyzing the weights (and not preferences) that are computed by an MCDM method.\n- **Standard scale (weights):**\n - [Aggregation](https://colab.research.google.com/drive/1148-72AHpfxGhfimLCjs-84prgoQ0wlr#scrollTo=GbxNVoSK4Ft9)\n - [Clustering](https://colab.research.google.com/drive/1vnOkOfGZX5782yzlLTQqEPEbncbmLoV4?usp=drive_open#scrollTo=r2TdKUNtSTDm)\n\n## Visualization\n\nBayesMCDM offers several visualization tools to help interpret Bayesian results:\n\n### Credal Ranking\n\n<!--  -->\n\n<p align=\"center\">\n <img src=\"https://raw.githubusercontent.com/Majeed7/BayesMCDM/main/figures/credal_ranking.png\" alt=\"Weight Distribution example\" height=\"500px\"/>\n</p>\n*Figure: Example of a credal ranking plot showing the probability of each criterion being more important than another.*\n\n**Credal ranking** visualizes the probabilistic ranking of criteria, showing the likelihood of each criterion occupying each rank based on the posterior weight distributions. This helps in understanding the robustness and uncertainty of the ranking outcomes.\n\n### Weight Distributions\n\n<p align=\"center\">\n <img src=\"https://raw.githubusercontent.com/Majeed7/BayesMCDM/main/figures/ridge_plot.png\" alt=\"Weight Distribution example\" height=\"500px\"/>\n</p>\n* Figure: Example of weight distributions *\n\n\n**Weight distributions** plots display the full posterior distributions of criteria weights, allowing users to assess uncertainty, variability, and the impact of preference types on the final weights.\n\n\n\n\n## PyPI Package & Installation\n\nBayesMCDM is available as a PyPI package. You can install it directly using pip:\n\n```bash\npip install bayesmcdm\n```\n\nAfter installation, you can use BayesMCDM in your Python scripts or Jupyter notebooks. Here is a minimal example (from the AHP Aggregation notebook) to get you started:\n\n```python\nimport numpy as np\nfrom BayesMCDM import AHP\n\n# Define the PCM array (example for 5 criteria, 5 decision makers)\nPCM = [\n [\n [1, 3, 5, 4, 7],\n [1/3, 1, 3, 2, 5],\n [1/5, 1/3, 1, 1/2, 3],\n [1/4, 1/2, 2, 1, 3],\n [1/7, 1/5, 1/3, 1/3, 1],\n ],\n [\n [1, 4, 3, 5, 8],\n [1/4, 1, 4, 3, 6],\n [1/3, 1/4, 1, 1, 5],\n [1/5, 1/3, 1, 1, 7],\n [1/8, 1/6, 1/5, 1/7, 1],\n ],\n # ... (other decision makers' PCMs) ...\n]\ncriteria_names = [\"C1\", \"C2\", \"C3\", \"C4\", \"C5\"]\n\n# Initialize and run the Bayesian AHP model\nahp = AHP.StandardAHP(PCM=PCM)\nahp.sampling()\n```\n\nSee the example notebooks for more advanced usage, visualization, and group decision-making features.\n\n## License\n\nThis project is licensed under the MIT License.\n\n---\n\nBuilt by Majid Mohammadi\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Bayesian Multi-Criteria Decision-Making Toolkit",
"version": "0.1.1.59",
"project_urls": null,
"split_keywords": [
"python",
" multi criteria decision making (mcdm)",
" bayesian",
" credal ranking",
" analytic hierarchy process (ahp)",
" best worst method (bwm)",
" swing",
" point allocation",
" weight aggregation",
" bayesian inference",
" decision analysis",
" decision support systems",
" decision making",
" group decision making",
" group aggregation",
" group clustering",
" interval preferences",
" preference modeling",
" preference aggregation",
" preference elicitation",
" gaussian number preferences",
" triangular number preferences",
" interval number preferences",
" fuzzy number preferences",
" probabilistic ranking",
" probabilistic decision making",
" probabilistic preference modeling",
" probabilistic group decision making",
" probabilistic group aggregation",
" probabilistic group clustering",
" correlation analysis",
" correlation-based decision making",
" correlation-based preference modeling",
" correlation based group decision making",
" correlation-based group aggregation",
" correlation-based group clustering",
" criteria correlation",
" criteria correlation analysis"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "8d92ea541bb1b945c7479d64281f1522626c37d3f003df9c33730771afa4b019",
"md5": "50d146fb5c584fed518f2e611b1d0650",
"sha256": "29b8ebfaef4d858516e1eb78302887697b99fe02c508934ee20ed12d929af5a4"
},
"downloads": -1,
"filename": "bayesmcdm-0.1.1.59-py3-none-any.whl",
"has_sig": false,
"md5_digest": "50d146fb5c584fed518f2e611b1d0650",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 52328,
"upload_time": "2025-08-12T08:40:47",
"upload_time_iso_8601": "2025-08-12T08:40:47.584157Z",
"url": "https://files.pythonhosted.org/packages/8d/92/ea541bb1b945c7479d64281f1522626c37d3f003df9c33730771afa4b019/bayesmcdm-0.1.1.59-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "077c6f255a5691b333d630e96ff324007c6fd2bba43728c4e8c6111ffcea2256",
"md5": "637050cae282c79c9518ccde225817c4",
"sha256": "64eb27d95ba8664db84676e63d798a07bd13928755b9062e5cc447083d93e1ce"
},
"downloads": -1,
"filename": "bayesmcdm-0.1.1.59.tar.gz",
"has_sig": false,
"md5_digest": "637050cae282c79c9518ccde225817c4",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 34090,
"upload_time": "2025-08-12T08:40:48",
"upload_time_iso_8601": "2025-08-12T08:40:48.829508Z",
"url": "https://files.pythonhosted.org/packages/07/7c/6f255a5691b333d630e96ff324007c6fd2bba43728c4e8c6111ffcea2256/bayesmcdm-0.1.1.59.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-12 08:40:48",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "bayesmcdm"
}