Package with Methods for Multi-Criteria Decision Analysis
Project description
pyrepo-mcda
The Python 3 library for Multi-Criteria Decision Analysis.
Installation
pip install pyrepo-mcda
Usage
pyrepo-mcda
can be used to rank alternatives after providing their performance values in two-dimensional decision matrix
with alternatives in rows and criteria in columns, and criteria weights and types in vectors. Here is example of using the TOPSIS
method:
from pyrepo_mcda.mcda_methods import TOPSIS
from pyrepo_mcda import distance_metrics as dists
from pyrepo_mcda import normalizations as norms
from pyrepo_mcda.additions import rank_preferences
import numpy as np
matrix = np.array([[256, 8, 41, 1.6, 1.77, 7347.16],
[256, 8, 32, 1.0, 1.8, 6919.99],
[256, 8, 53, 1.6, 1.9, 8400],
[256, 8, 41, 1.0, 1.75, 6808.9],
[512, 8, 35, 1.6, 1.7, 8479.99],
[256, 4, 35, 1.6, 1.7, 7499.99]])
weights = np.array([0.405, 0.221, 0.134, 0.199, 0.007, 0.034])
types = np.array([1, 1, 1, 1, -1, -1])
topsis = TOPSIS(normalization_method=norms.vector_normalization, distance_metric=dists.euclidean)
pref = topsis(matrix, weights, types)
rank = rank_preferences(pref, reverse = True)
print(rank)
License
pyrepo-mcda
was created by Aleksandra Bączkiewicz. It is licensed under the terms of the MIT license.
Documentation
Documentation of this library with instruction of installation and usage is provided here
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
pyrepo-mcda-0.0.11.tar.gz
(15.4 kB
view hashes)
Built Distribution
Close
Hashes for pyrepo_mcda-0.0.11-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4c7d7fd2632d58604a40b8f165659b1e81d3b5d8bfd058dd7466611c0b707816 |
|
MD5 | 712c6172722bc9aef1c988147e94d64b |
|
BLAKE2b-256 | 09bc6e7fd06a49b69beff7304995c86fa6938d300538b14caaafb57baa2bd153 |