Skip to main content

A Python package to find TOPSIS for multi-criteria decision analysis method

Project description

TOPSIS-Python

Submitted By: MAHESH MANI 102297002


What is TOPSIS?

Technique for Order Preference by Similarity to Ideal Solution (TOPSIS) originated in the 1980s as a multi-criteria decision-making method. TOPSIS chooses the alternative of the shortest Euclidean distance from the ideal solution and greatest distance from the negative-ideal solution. More details can be found on Wikipedia.

How to use this package:

The TOPSIS-MAHESH-MANI-102297002 package can be run as shown in the following example:

In Command Prompt to run the code:

topsis data.csv "1,1,1,1" "+,+,-,+" out.csv

Sample dataset

Name    P1     P2    P3     P4    P5
M1      0.86   0.74  4.8    61.8  17.05
M2      0.83   0.69  6.6    48.5  14.16
M3      0.62   0.38  3.3    33    9.33
M4      0.83   0.69  6.4    45.5  13.36
M5      0.95   0.9   6.8    45    13.41
M6      0.61   0.37  3.6    36    10.15
M7      0.9    0.81  4.5    62.5  17.18
M8      0.89   0.79  4.7    38.9  11.32

Output

Name  P1    P2    P3   P4    P5     Topsis Score       Rank
M1    0.86  0.74  4.8  61.8  17.05  0.7003233012352760  3
M2    0.83  0.69  6.6  48.5  14.16  0.6562533743146750  6
M3    0.62  0.38  3.3  33.0  9.33   0.0135325373752343  8
M4    0.83  0.69  6.4  45.5  13.36  0.6089902720065850  4
M5    0.95  0.9   6.8  45.0  13.41  0.7157691264417760  2
M6    0.61  0.37  3.6  36.0  10.15  0.07412480075376210 1
M7    0.9   0.81  4.5  62.5  17.18  0.711919899272116   7
M8    0.89  0.79  4.7  38.9  11.32  0.49267086270406500 5

Explanation:

  • Name: Identifies the alternatives.
  • P1, P2, P3, P4, P5: Represents the performance values for each criterion.
  • Topsis Score: The calculated TOPSIS score for each alternative.
  • Rank: The ranking of each alternative based on the TOPSIS score.

Simply run the provided command in the Command Prompt, replacing the input data file name, weights, impacts, and result file name with your specific values. The output will be a new CSV file containing the results of the TOPSIS analysis.

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

TOPSIS-MAHESH-MANI-102297002-1.0.0.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

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

TOPSIS_MAHESH_MANI_102297002-1.0.0-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file TOPSIS-MAHESH-MANI-102297002-1.0.0.tar.gz.

File metadata

File hashes

Hashes for TOPSIS-MAHESH-MANI-102297002-1.0.0.tar.gz
Algorithm Hash digest
SHA256 d8add6dbcdffaeaf593dfad05b6fe6ef30b03f84a4757aafe14ecb2e81e817ba
MD5 b910a29a758fd3d65375510b40fde855
BLAKE2b-256 6a0c9c10d4c3b5dba5805bd0fbf1f16623f5076c8803426452fbc7d6208f5237

See more details on using hashes here.

File details

Details for the file TOPSIS_MAHESH_MANI_102297002-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for TOPSIS_MAHESH_MANI_102297002-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 473c7f9e860e7380259cac7a7177bdbbe537bb71c55087924e97bcbe69d6db94
MD5 b3e661bbc071f3ee3a75c15a94fcff65
BLAKE2b-256 3cc0cd4b557f14b6888e4e995d9ff8b02ffcfa1136699812240b8e5ee50f258c

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