Skip to main content

BayesMCDM: Bayesian Multi-Criteria Decision-Making Toolkit bayesmcdm_logo

PyPI version License

PyPI - Python Version PyPI status Downloads

Code Style: Black Contributions Welcome Last Commit

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.

2. Best-Worst Method (BWM)

BWM uses the best and worst criteria to derive optimal weights through pairwise comparisons.

3. SWING Method

The SWING method elicits weights by asking decision-makers to "swing" criteria from worst to best, reflecting their relative importance.

4. Point Allocation

Point Allocation allows decision-makers to distribute a fixed number of points among criteria to indicate their importance.

5. Weight Analyzer

The Weight Analyzer provides tools for analyzing the weights (and not preferences) that are computed by an MCDM method.

Visualization

BayesMCDM offers several visualization tools to help interpret Bayesian results:

Credal Ranking

Weight Distribution example

*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

Weight Distribution example

* 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:

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:

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

Metadata

Release files for BayesMCDM 0.1.1.59

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for BayesMCDM 0.1.1.59
File Size Uploaded
bayesmcdm-0.1.1.59.tar.gz 34.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for BayesMCDM 0.1.1.59
File Interpreter ABI Platform
bayesmcdm-0.1.1.59-py3-none-any.whl Python 3 none any Details

Total release size: 86.4 kB

Release files / bayesmcdm-0.1.1.59.tar.gz

Download URL bayesmcdm-0.1.1.59.tar.gz
Size 34.1 kB
Tags Source
SHA-256 checksum
How to use checksums
64eb27d95ba8664db84676e63d798a07bd13928755b9062e5cc447083d93e1ce
BLAKE2b-256 checksum
How to use checksums
077c6f255a5691b333d630e96ff324007c6fd2bba43728c4e8c6111ffcea2256
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.9.4

Release files / bayesmcdm-0.1.1.59-py3-none-any.whl

Download URL bayesmcdm-0.1.1.59-py3-none-any.whl
Size 52.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
29b8ebfaef4d858516e1eb78302887697b99fe02c508934ee20ed12d929af5a4
BLAKE2b-256 checksum
How to use checksums
8d92ea541bb1b945c7479d64281f1522626c37d3f003df9c33730771afa4b019
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.9.4
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page