Python library for Multi-Criteria Decision-Making
Project description
PyMCDM
Python 3 library for solving multi-criteria decision-making (MCDM) problems.
Installation
You can download and install pymcdm
library using pip:
pip install pymcdm
Available methods
The library contains:
-
MCDA methods:
- TOPSIS
- VIKOR
- COPRAS
- PROMETHEE I and II
- COMET
- SPOTIS
-
Weighting methods:
- Equal weights
- Entropy method
- Std method
-
Normalization methods:
- Linear
- Max
- Sum
- Vector
- Logarithmic
-
Correlation coefficients:
- Spearman
- Pearson
- Weighted Spearman
- Rank Similarity Coefficient
- Kendall Tau
- Goodman and Kruskal Gamma
-
Helpers
- rankdata
- rrankdata
Usage example
Here's a small example of how use this library to solve MCDM problem. For more examples with explanation see examples.
import numpy as np
from pymcdm.methods import TOPSIS
from pymcdm.helpers import rrankdata
# Define decision matrix (2 criteria, 4 alternative)
alts = np.array([
[4, 4],
[1, 5],
[3, 2],
[4, 2]
], dtype='float')
# Define weights and types
weights = np.array([0.5, 0.5])
types = np.array([1, -1])
# Create object of the method
topsis = TOPSIS()
# Determine preferences and ranking for alternatives
pref = topsis(alts, weights, types)
ranking = rrankdata(pref)
for r, p in zip(ranking, pref):
print(r, p)
And the output of this example (numbers are rounded):
3 0.6126
4 0.0
2 0.7829
1 1.0
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pymcdm-1.0.3.post1.tar.gz
(119.7 kB
view hashes)
Built Distribution
Close
Hashes for pymcdm-1.0.3.post1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5cea5e22e623c059144d7ef67dafd580b7a6d6038db77dfe450551495fa6b3b1 |
|
MD5 | 5cc981edfbbb5597bf397414150dd4b7 |
|
BLAKE2b-256 | abae0eadb564e0c045248988a0812343cb0c01ea78f9810d5b8ad6f0939f866e |