Skip to main content

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

Project description

TOPSIS-Python

Submitted By: Sanyam Goyal 102297005


What is TOPSIS

Technique for Order Preference by Similarity to Ideal Solution (TOPSIS), is a decision-making method used in multi-criteria decision analysis. It is a mathematical technique that helps in ranking and selecting the best alternative from a set of options based on their proximity to an ideal solution. Check out more information here:wikipedia.


How to use this package:

TOPSIS-SANYAM_GOYAL-102297005 can be run as in the following example:

In Command Prompt to run the code:

python topsis input_data.csv "1,1,1,1" "+,+,-,+" output_data.csv

Sample dataset

The decision matrix (a) should be constructed with each row representing a ID, and each column representing a criterion like Features

ID Feature1 Feature2 Feature3 Feature4
1 2 5 8 3
2 3 6 9 4
3 5 8 2 7
4 6 9 3 8

Output

ID,Feature1,Feature2,Feature3,Feature4,Topsis Score,Rank
1,2,5,8,3,0.33629008441513597,3
2,3,6,9,4,0.26542732311540135,4
3,5,8,2,7,0.7345726768845987,1
4,6,9,3,8,0.6637099155848639,2


The rankings are displayed in the form of a table using a package 'tabulate', with the 1st rank offering us the best decision, and last rank offering the worst decision making, according to TOPSIS method.

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-SANYAM_GOYAL-102297005-0.0.1.tar.gz (4.8 kB view hashes)

Uploaded Source

Built Distribution

Supported by

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