Skip to main content

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


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.tar.gz (119.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pymcdm-1.0.3-py3-none-any.whl (15.8 kB view details)

Uploaded Python 3

File details

Details for the file pymcdm-1.0.3.tar.gz.

File metadata

  • Download URL: pymcdm-1.0.3.tar.gz
  • Upload date:
  • Size: 119.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.1.0.post20201221 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.9.1

File hashes

Hashes for pymcdm-1.0.3.tar.gz
Algorithm Hash digest
SHA256 3ab76068e584c5fc236b4e1a2654ea4625d55ba7f35ec5f23a0f4a459d09ef7e
MD5 4a93c5464ef7676db5481ec4cffac491
BLAKE2b-256 a6e3d2bf84450d2e44d065039e7a29375d2e3dbd3327cb9c4d8474393d9ba323

See more details on using hashes here.

File details

Details for the file pymcdm-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: pymcdm-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 15.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.1.0.post20201221 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.9.1

File hashes

Hashes for pymcdm-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 a1cd8cc61ac446c522a3cb78ff9b20e3da3c9db5a82e3a5b013ac6394d92c506
MD5 6245a843c2f9660800312b9a9862bfce
BLAKE2b-256 b0e473ec53c3beea510ea61225e852184cf048565854c572ec2c393e86c00964

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page