Skip to main content

Logo

Citation

PEREIRA, V.; BASILIO, M.P.; SANTOS, C.H.T (2026). Enhancing Decision Analysis with a Large Language Model: pyDecision a Comprehensive Library of MCDA Methods in Python. Journal of Modelling in Management, Vol. 21 No. 2 pp. 481---521, doi: https://doi.org/10.1108/JM2-04-2024-0118

pyDecision - MCDA Studio

New to Python or prefer a graphical interface? The pyDecision - MCDA Studio lets you run your analysis in clicks, not lines of code.

import pyDecision 

# Start the web service using:
pyDecision.web_app()

# Terminate the web service using:
pyDecision.web_stop()

Lab

This Google Colab Demo is intended for quick demos only. For the best experience, run the Web UI locally or open it directly in a full browser.

Introduction

A python library with the following MCDA methods: AHP (Analytic Hierarchy Process); ANP (Analytic Network 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; CPP-Tri (Composition of Probabilistic Preferences); 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; ELECTRE (ELimination Et Choix Traduisant la REalite I, I_s, I_v, II, III, IV, Tri-B, Tri-nB, Tri-C, Tri-nC); Entropy; Flowsort; FUCOM (Full Consistency Method); Fuzzy FUCOM; GRA (Grey Relational Analysis); IDOCRIW (Integrated Determination of Objective CRIteria Weights); LaRa (Laplacian Ranking); LMAW (Logarithm Methodology of Additive 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); MEM (Multiplex Electionis Methodus); 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); ODO-OVO (Ontologic Decision Optimization and Ontologic Vector Optimization); Fuzzy OCRA ; OPA (Ordinal Priority Approach); ORESTE (Organisation Rangement Et SynThesE de donnees relationnelles); PIV (Proximity Indexed Value); PROMETHEE (Preference Ranking Organization METHod for Enrichment Evaluation I, II, III, IV, V, VI, Gaia); EC PROMETHEE; RANCOM (RANking COMparison); 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); SABINA (Smooth Adaptive Bandwidth Integrated Net-flow Aggregation); 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; UTADIS (UTilites Additives DIScriminantes I, II, III); 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, Gemini, and others LLMs, 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 comparison.

Usage

  1. Install
pip install pyDecision
  1. 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')
  1. Try it in Colab:
  1. Compare Methods:
  1. Advanced MCDA Methods:
  • 3MOAHP - Inconsistency Reduction Technique for AHP and Fuzzy-AHP Methods
  • EC-PROMETHEE - A Committee Approach for Outranking Problems
  • EC-TOPSIS - A Committee Approach for Outranking Problems
  • ELECTRE-Tree - Algorithm to infer the ELECTRE Tri-B method parameters
  • MCDM Scheduler - A MCDM approach for Scheduling Problems
  • Ranking-Trees - Algorithm to infer the ELECTRE II, III, IV and PROMETHEE I, II, III, IV method parameters
  • pyMissingAHP - A Method to Infer AHP Missing Pairwise Comparisons
  • pyRankMCDA - A Rank Aggregation Library for MCDA problems

Acknowledgement

This section is dedicated to everyone who helped improve or correct the code. Thank you very much!

Metadata

Release files for pydecision 5.1.7

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

Source distribution (sdist)

Source distribution for pydecision 5.1.7
File Size Uploaded
pydecision-5.1.7.tar.gz 182.8 kB Details

Built distribution (wheel)

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

Total release size: 426.1 kB

Release files / pydecision-5.1.7.tar.gz

Download URL pydecision-5.1.7.tar.gz
Size 182.8 kB
Tags Source
SHA-256 checksum
How to use checksums
bebe43d58b217f6597b41b05239ebe060a0eccfe705ac20f349b286bffb4f517
BLAKE2b-256 checksum
How to use checksums
8984039278e722b385b64b7b1be3af068f8c6650032b479b11167ac90d79ca52
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.9

Release files / pydecision-5.1.7-py3-none-any.whl

Download URL pydecision-5.1.7-py3-none-any.whl
Size 243.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e455c2ad9724e172bb7c39cda745b5d02005cd7736e77d80c009ba6a563bccfb
BLAKE2b-256 checksum
How to use checksums
6da5d6d5722ae2a9bfa1ae0fd60fa3ac3263ee132c472d4bd7f0e3130a8d7257
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.9

Release history Release notifications | RSS feed

This release

5.1.7 This release

2 release files

5.1.5

2 release files

5.1.1

2 release files

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