Skip to main content

pfs-mcdm

Python License: MIT

ORCID

Python implementation of multi-criteria decision-making (MCDM) algorithms using pythagorean fuzzy sets (PFSs).

Implemented Algorithms:

  • Simple Aggregation
  • TOPSIS
  • PROMETHEE

Future Work:

  • Electre
  • COPRAS

For more information about PFSs and the implemented algorithms see:

  • Yager, R.R., & Abbasov, A.M. (2013). Pythagorean Membership Grades, Complex Numbers, and Decision Making. International Journal of Intelligent
    Systems, 28, doi:10.1002/int.21584.
  • Yager, R.R. (2014). Pythagorean Membership Grades in Multicriteria Decision Making. IEEE Transactions on Fuzzy Systems, 22, 958-965,
    doi:10.1109/TFUZZ.2013.2278989.
  • Zhang, X., & Xu, Z. (2014). Extension of TOPSIS to Multiple Criteria Decision Making with Pythagorean Fuzzy Sets. International Journal of
    Intelligent Systems, 29, doi:10.1002/int.21676.
  • Molla, M.U., Giri, B.C., & Biswas, P. (2021). Extended PROMETHEE method with Pythagorean fuzzy sets for medical diagnosis problems. Soft Comput.,
    25, 4503-4512, doi:10.1007/s00500-020-05458-7.
  • Ye, J., & Chen, T. (2022). Pythagorean Fuzzy Sets Combined with the PROMETHEE Method for the Selection of Cotton Woven Fabric. Journal of Natural
    Fibers, doi:10.1080/15440478.2022.2072993.

Installation

The pfs-mcdm package can be installed from PyPI using pip for Python 3.

$ pip install pfs-mcdm

How to use?

The decision matrix can be provided as a 2D array-like of tuples. Each tuple represents a pythagorean fuzzy number $(\mu, \nu)$. The weights of the criteria are provided as an 1D array-like of floats. Weights are normalized to sum to 1. Optionally, the aternatives argument can be used to provide alternatives' names.

The output solution is a pandas DataFrame

from pfs_mcdm import simple_aggregation, topsis, promethee

matrix = [ 
[(0.9, 0.3), (0.7, 0.6), (0.5, 0.8), (0.6, 0.3)],
[(0.4, 0.7), (0.9, 0.2), (0.8, 0.1), (0.5, 0.3)],  
[(0.8, 0.4), (0.7, 0.5), (0.6, 0.2), (0.7, 0.4)], 
[(0.7, 0.2), (0.8, 0.2), (0.8, 0.4), (0.6, 0.6)]] 
  
weights = [0.15, 0.25, 0.35, 0.25]  
  
alternatives = ['UNI AIR', 'Transasia', 'Mandarin', 'Daily Air']

Simple Aggregation:

simple_aggregation_sol = simple_aggregation(matrix, weights, alternatives=alternatives)  

print("MCDM solution using simple aggregation:")  
print(simple_aggregation_sol)
MCDM solution using simple aggregation:
Aggregated Score Rank
UNI AIR (0.635, 0.55) 0.101 4
Transasia (0.69, 0.265) 0.406 1
Mandarin (0.68, 0.355) 0.336 3
Daily Air (0.735, 0.37) 0.403 2

TOPSIS:

topsis_sol = topsis(matrix, weights, alternatives=alternatives)

print("MCDM solution using TOPSIS:")
print(topsis_sol)
MCDM solution using TOPSIS:
D+ D- Revised Closeness Rank
UNI AIR 0.351 0.165 -1.586 4
Transasia 0.175 0.396 0.000 1
Mandarin 0.204 0.359 -0.254 3
Daily Air 0.201 0.316 -0.348 2

PROMETHEE:

The promethee function takes an optional argument preference_func to determine the preference function to be used. Available functions are usual, ushape, vshape, level, and gaussian; default is usual.
  For ushape preference function, an additional argument q can be passed to determine the indifference threshold; default is zero. For vshape and level preference function, additional arguments q and p can be passed to determine the indifference and preference thresholds, respectively; default is zero. For the gaussian preference function, an additional argument s can be passed to determine the Gaussian threshold; default is 0.5.

promethee_sol = promethee(matrix, weights, alternatives=alternatives, preference_func='vshape', q=0.1, p=0.8)  

MCDM solution using PROMETHEE:  
print(promethee_sol)
MCDM solution using PROMETHEE:
Positive Outranking Negative Outranking Net Outranking Rank
UNI AIR 0.094 0.445 -0.351 4
Transasia 0.291 0.158 0.133 1
Mandarin 0.189 0.137 0.051 3
Daily Air 0.250 0.084 0.167 2

License

MIT

Release files for pfs-mcdm 0.2

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

Source distribution (sdist)

Source distribution for pfs-mcdm 0.2
File Size Uploaded
pfs-mcdm-0.2.tar.gz 8.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pfs-mcdm 0.2
File Interpreter ABI Platform
pfs_mcdm-0.2-py3-none-any.whl Python 3 none any Details

Total release size: 16.2 kB

Release files / pfs-mcdm-0.2.tar.gz

Download URL pfs-mcdm-0.2.tar.gz
Size 8.5 kB
Tags Source
SHA-256 checksum
How to use checksums
72b2f6e8488df77228c4661460f68d38a1a838650f804c3a8ec4e9c060692f17
BLAKE2b-256 checksum
How to use checksums
bc80cbce2d1e1facc4aa0649e37dd1f88404350f842a6644c1fff61da4133a7e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.7

Release files / pfs_mcdm-0.2-py3-none-any.whl

Download URL pfs_mcdm-0.2-py3-none-any.whl
Size 7.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
296d8d10955ab7d9f0c7e83787cdad95462280694edfa7aa30e95f38b7ac8962
BLAKE2b-256 checksum
How to use checksums
7caa3a5a997826c8522ae12acbcff36004c8fa7b815c38fc68c0b91e4e323866
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.7

Release history Release notifications | RSS feed

This release

0.2 This release

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