A MCDA Library Incorporating a Large Language Model to Enhance Decision Analysis
Project description
pyDecision
Introduction
A python library with the following MCDA methods: AHP (Analytic Hierarchy Process); Fuzzy AHP; PPF AHP (Proportional Picture Fuzzy AHP); ARAS (Additive Ratio ASsessment); Fuzzy ARAS; Borda; BWM (Best-Worst Method); Simplified BWM; Fuzzy BWM; CILOS (Criterion Impact LOSs); CoCoSo (COmbined COmpromise SOlution); CODAS (Combinative Distance-based Assessment); Copeland; COPRAS (Complex PRoportional Assessment); Fuzzy COPRAS; CRADIS (Compromise Ranking of Alternatives from Distance to Ideal Solution); CRITIC (CRiteria Importance Through Intercriteria Correlation); Fuzzy CRITIC; DEMATEL (DEcision MAking Trial and Evaluation Laboratory); Fuzzy DEMATEL; EDAS (Evaluation based on Distance from Average Solution); Fuzzy EDAS; Entropy; ELECTRE (I, I_s, I_v, II, III, IV, Tri-B); FUCOM (Full Consistency Method); Fuzzy FUCOM; GRA (Grey Relational Analysis); IDOCRIW (Integrated Determination of Objective CRIteria Weights); MABAC (Multi-Attributive Border Approximation area Comparison); MACBETH (Measuring Attractiveness by a Categorical Based Evaluation TecHnique); MAIRCA (Multi-Attributive Ideal-Real Comparative Analysis); MARA (Magnitude of the Area for the Ranking of Alternatives) ; MARCOS (Measurement of Alternatives and Ranking according to COmpromise Solution); MAUT (Multi-attribute Utility Theory); MEREC (MEthod based on the Removal Effects of Criteria); MOORA (Multi-Objective Optimization on the basis of Ratio Analysis); Fuzzy MOORA; MOOSRA (Multi-Objective Optimisation on the Basis of Simple Ratio Analysis); MULTIMOORA (Multi-Objective Optimization on the basis of Ratio Analisys Multiplicative Form); OCRA (Operational Competitiveness RAting); Fuzzy OCRA ; OPA (Ordinal Priority Approach); ORESTE (Organisation Rangement Et SynThesE de donnees relationnelles); PIV (Proximity Indexed Value); PROMETHEE (I, II, III, IV, V, VI, Gaia); EC PROMETHEE; RAFSI (Ranking of Alternatives through Functional mapping of criterion sub-intervals into a Single Interval); REGIME (REGIonal Multicriteria Elimination); ROC (Rank Ordered Centroid); ROV (Range Of Value); RRW (Rank Reciprocal Weighting); RSW (Rank Summed Weight); SAW (Simple Additive Weighting); SECA (Simultaneous Evaluation of Criteria and Alternatives); SMART (Simple Multi-Attribute Rating Technique); SPOTIS (Stable Preference Ordering Towards Ideal Solution); TODIM (TOmada de Decisao Interativa e Multicriterio - Interactive and Multicriteria Decision Making); PSI (Preference Selection Index); MPSI (Modified Preference Selection Index); TOPSIS (Technique for Order of Preference by Similarity to Ideal Solution); Fuzzy TOPSIS; VIKOR (VIseKriterijumska Optimizacija I Kompromisno Resenje); Fuzzy VIKOR; WINGS (Weighted Influence Non-linear Gauge System); WISP (Integrated Simple Weighted Sum Product); Simple WISP; WSM (Weighted Sum Model); Fuzzy WSM; WPM (Weighted Product Model); Fuzzy WPM; WASPAS (Weighted Aggregates Sum Product Assessment); Fuzzy WASPAS.
pyDecision offers an array of features, including the comparison of ranking alternatives and comparison of criterion weights from various methods. The library is also fully integrated with chatGPT, elevating result interpretation through AI. Additionally, pyDecision provides the flexibility to import results from custom methods or those not yet implemented in the library for swift comparison.
Citation
PEREIRA, V.; BASILIO, M.P.; SANTOS, C.H.T (2024). Enhancing Decision Analysis with a Large Language Model: pyDecision a Comprehensive Library of MCDA Methods in Python. arXiv. https://arxiv.org/abs/2404.06370
Usage
- Install
pip install pyDecision
- Import
# Import AHP
from pyDecision.algorithm import ahp_method
# Parameters
weight_derivation = 'geometric' # 'mean'; 'geometric' or 'max_eigen'
# Dataset
dataset = np.array([
#g1 g2 g3 g4 g5 g6 g7
[1 , 1/3, 1/5, 1 , 1/4, 1/2, 3 ], #g1
[3 , 1 , 1/2, 2 , 1/3, 3 , 3 ], #g2
[5 , 2 , 1 , 4 , 5 , 6 , 5 ], #g3
[1 , 1/2, 1/4, 1 , 1/4, 1 , 2 ], #g4
[4 , 3 , 1/5, 4 , 1 , 3 , 2 ], #g5
[2 , 1/3, 1/6, 1 , 1/3, 1 , 1/3], #g6
[1/3, 1/3, 1/5, 1/2, 1/2, 3 , 1 ] #g7
])
# Call AHP Function
weights, rc = ahp_method(dataset, wd = weight_derivation)
# Weigths
for i in range(0, weights.shape[0]):
print('w(g'+str(i+1)+'): ', round(weights[i], 3))
# Consistency Ratio
print('RC: ' + str(round(rc, 2)))
if (rc > 0.10):
print('The solution is inconsistent, the pairwise comparisons must be reviewed')
else:
print('The solution is consistent')
- Try it in Colab:
- AHP ( Colab Demo ) ( Paper )
- Fuzzy AHP ( Colab Demo ) ( Paper )
- PPF AHP ( Colab Demo ) ( Paper )
- ARAS ( Colab Demo ) ( Paper )
- Fuzzy ARAS ( Colab Demo ) ( Paper )
- Borda ( Colab Demo ) ( Paper )
- BWM ( Colab Demo ) ( Paper )
- Simplified BWM ( Colab Demo ) ( Paper )
- Fuzzy BWM ( Colab Demo ) ( Paper )
- CILOS ( Colab Demo ) ( Paper )
- CoCoSo ( Colab Demo ) ( Paper )
- CODAS ( Colab Demo ) ( Paper )
- Copeland ( Colab Demo ) ( Paper )
- COPRAS ( Colab Demo ) ( Paper )
- Fuzzy COPRAS ( Colab Demo ) ( Paper )
- CRADIS ( Colab Demo ) ( Paper )
- CRITIC ( Colab Demo ) ( Paper )
- Fuzzy CRITIC ( Colab Demo ) ( Paper )
- DEMATEL ( Colab Demo ) ( Paper )
- Fuzzy DEMATEL ( Colab Demo ) ( Paper )
- EDAS ( Colab Demo ) ( Paper )
- Fuzzy EDAS ( Colab Demo ) ( Paper )
- Entropy ( Colab Demo ) ( Paper )
- ELECTRE I ( Colab Demo ) ( Paper )
- ELECTRE I_s ( Colab Demo ) ( Paper )
- ELECTRE I_v ( Colab Demo ) ( Paper )
- ELECTRE II ( Colab Demo ) ( Paper )
- ELECTRE III ( Colab Demo ) ( Paper )
- ELECTRE IV ( Colab Demo ) ( Paper )
- ELECTRE Tri-B ( Colab Demo ) ( Paper )
- FUCOM ( Colab Demo ) ( Paper )
- Fuzzy FUCOM ( Colab Demo ) ( Paper )
- GRA ( Colab Demo ) ( Paper )
- IDOCRIW ( Colab Demo ) ( Paper )
- MABAC ( Colab Demo ) ( Paper )
- MACBETH ( Colab Demo ) ( Paper )
- MAIRCA ( Colab Demo ) ( Paper )
- MARA ( Colab Demo ) ( Paper )
- MARCOS ( Colab Demo ) ( Paper )
- MAUT ( Colab Demo ) ( Paper )
- MEREC ( Colab Demo ) ( Paper )
- Fuzzy MEREC ( Colab Demo ) ( Paper )
- MOORA ( Colab Demo ) ( Paper )
- Fuzzy MOORA ( Colab Demo ) ( Paper )
- MOOSRA ( Colab Demo ) ( Paper )
- MULTIMOORA ( Colab Demo ) ( Paper )
- OCRA ( Colab Demo ) ( Paper )
- Fuzzy OCRA ( Colab Demo ) ( Paper )
- OPA ( Colab Demo ) ( Paper )
- ORESTE ( Colab Demo ) ( Paper )
- PIV ( Colab Demo ) ( Paper )
- PROMETHEE I ( Colab Demo ) ( Paper )
- PROMETHEE II ( Colab Demo ) ( Paper )
- PROMETHEE III ( Colab Demo ) ( Paper )
- PROMETHEE IV ( Colab Demo ) ( Paper )
- PROMETHEE V ( Colab Demo ) ( Paper )
- PROMETHEE VI ( Colab Demo ) ( Paper )
- PROMETHEE Gaia ( Colab Demo ) ( Paper )
- EC PROMETHEE ( Colab Demo ) ( Paper )
- PSI ( Colab Demo ) ( Paper )
- MPSI ( Colab Demo ) ( Paper )
- RAFSI ( Colab Demo ) ( Paper )
- REGIME ( Colab Demo ) ( Paper )
- ROC ( Colab Demo ) ( Paper )
- ROV ( Colab Demo ) ( Paper )
- RRW ( Colab Demo ) ( Paper )
- RSW ( Colab Demo ) ( Paper )
- SAW ( Colab Demo ) ( Paper )
- SECA ( Colab Demo ) ( Paper )
- SMART ( Colab Demo ) ( Paper )
- SPOTIS ( Colab Demo ) ( Paper )
- TODIM ( Colab Demo ) ( Paper )
- TOPSIS ( Colab Demo ) ( Paper )
- Fuzzy TOPSIS ( Colab Demo ) ( Paper )
- VIKOR ( Colab Demo ) ( Paper )
- Fuzzy VIKOR ( Colab Demo ) ( Paper )
- WINGS ( Colab Demo ) ( Paper )
- WISP, Simple WISP ( Colab Demo ) ( Paper )
- WSM, WPM, WASPAS ( Colab Demo ) ( Paper )
- Fuzzy WSM, Fuzzy WPM, Fuzzy WASPAS ( Colab Demo ) ( Paper )
- Compare Methods:
- Compare Ranks & Ask chatGPT ( Colab Demo )
- Compare Fuzzy Ranks & Ask chatGPT ( Colab Demo )
- Compare Weights & Ask chatGPT ( Colab Demo )
- Compare Fuzzy Weights & Ask chatGPT ( Colab Demo )
- Advanced MCDA Methods:
- 3MOAHP - Inconsistency Reduction Technique for AHP and Fuzzy-AHP Methods
- pyMissingAHP - A Method to Infer AHP Missing Pairwise Comparisons
- ELECTRE-Tree - Algorithm to infer the ELECTRE Tri-B method parameters
- Ranking-Trees - Algorithm to infer the ELECTRE II, III, IV, and PROMETHEE I, II, III, IV method parameters
Acknowledgement
This section is dedicated to everyone who helped improve or correct the code. Thank you very much!
- Sabir Mohammedi Taieb (23.JANUARY.2023) - https://sabir97.github.io/ - Université Abdelhamid Ibn Badis Mostaganem (Algeria)
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
Built Distribution
File details
Details for the file pyDecision-4.5.8.tar.gz
.
File metadata
- Download URL: pyDecision-4.5.8.tar.gz
- Upload date:
- Size: 64.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.28.1 requests-toolbelt/0.9.1 urllib3/1.25.11 tqdm/4.64.1 importlib-metadata/4.11.3 keyring/23.4.0 rfc3986/2.0.0 colorama/0.4.6 CPython/3.7.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 423df9f6ce578e8066ae7d66f0b2bbfb37636bdf09ed3b69f2fcb105396cc254 |
|
MD5 | 204c4cec4e2b0be703c7cb0369d2ed2b |
|
BLAKE2b-256 | a56e9cac7d0afa3dd11332e0a36a82943e8aad835b68b884e1786554678b47ea |
File details
Details for the file pyDecision-4.5.8-py3-none-any.whl
.
File metadata
- Download URL: pyDecision-4.5.8-py3-none-any.whl
- Upload date:
- Size: 119.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.28.1 requests-toolbelt/0.9.1 urllib3/1.25.11 tqdm/4.64.1 importlib-metadata/4.11.3 keyring/23.4.0 rfc3986/2.0.0 colorama/0.4.6 CPython/3.7.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 95ece1c7ae83d1193d2562007894e1ee0907768b3a5f7966f925b78ed0ccb153 |
|
MD5 | 5ad3a8ab2c541358bf89a3e65f5fbd44 |
|
BLAKE2b-256 | 12f521ff05ea2ddacd9e91e573afa1ec4a43c76fcd1db1595b94e1ac548fac58 |