Skip to main content

Bayesian Multi-Criteria Decision-Making Toolkit

Project description

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

Each method currently supports the standard preference type (e.g., 1-9 scale), which is fully implemented, tested, and ready for use. Additionally, BayesMCDM is being extended to handle a variety of preference formats for each method (these features are under active testing):

  • Interval preferences
  • Triangular fuzzy preferences
  • Gaussian (normal) preferences

Support for group aggregation of preferences is also being developed, enabling analysis of collective decisions from multiple decision-makers. Additionally, a decision-maker clustering feature is under construction, which will identify groups of decision-makers with homogeneous preferences.

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 computed weights (and not preferences).

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

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

bayesmcdm-0.1.1.55.tar.gz (33.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bayesmcdm-0.1.1.55-py3-none-any.whl (52.0 kB view details)

Uploaded Python 3

File details

Details for the file bayesmcdm-0.1.1.55.tar.gz.

File metadata

  • Download URL: bayesmcdm-0.1.1.55.tar.gz
  • Upload date:
  • Size: 33.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.4

File hashes

Hashes for bayesmcdm-0.1.1.55.tar.gz
Algorithm Hash digest
SHA256 43ec9d443e25be68c6c0efec30569016543768b994c3492a22523a0c814802a2
MD5 7693ca79c0d8fda713923250361a6be5
BLAKE2b-256 ea845f92c689b6d9614654ae1eb67e28de450cad5d0452812e7e7b1dd1ea23f7

See more details on using hashes here.

File details

Details for the file bayesmcdm-0.1.1.55-py3-none-any.whl.

File metadata

  • Download URL: bayesmcdm-0.1.1.55-py3-none-any.whl
  • Upload date:
  • Size: 52.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.4

File hashes

Hashes for bayesmcdm-0.1.1.55-py3-none-any.whl
Algorithm Hash digest
SHA256 cde1f2623ab05502dad075f97fd41e8ad2c7ac5f262c757c5194f2afbd5026f4
MD5 81c1c76130340507f88dad9a9bcc6024
BLAKE2b-256 4918dc0fe624fdd50ad5505e4f24765bbb45c620af8e8a23c3aaf1f4c7f91fb9

See more details on using hashes here.

Supported by

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