Skip to main content

A python package for TOPSIS

Project description

TOPSIS Package in Python

Submitted by : Deepansha Goyal Roll no : 101803252

UCS538


What Is TOPSIS

TOPSIS is an acronym that stands for 'Technique of Order Preference Similarity to the Ideal Solution' and is a pretty straightforward MCDA method. As the name implies, the method is based on finding an ideal and an anti-ideal solution and comparing the distance of each one of the alternatives to those


How To Use

The package TOPSIS-Deepansha-101803252 can be run though the command line as follows:

>> pip install TOPSIS-Deepansha-101803252
>> topsis data.csv "1,1,1,2" "+,+,-,+" result.csv

Note:

  • Usages: topsis data.csv "1,1,1,2" "+,+,-,+" result.csv

  • Input File:

    • Input file contain three or more columns.
    • First column is the object/variable name (e.g. M1, M2, M3, M4...).
    • From 2nd to last columns contain numeric values only.
  • Output File:

    • Result file contains all the columns of input file and two additional columns having Topsis Score and Rank
  • The output is created in the form of csv file and stored and also it is displayed.

  • The impacts given in the command line should be either + or - depending if you want to maximise the column parameter or minimise it.

Sample Input

Here is a sample set of data which can be used for the following package:

ModelCorrelationR2RMSEAccuracy
M10.790.621.2560.89
M20.660.442.8963.07
M30.560.311.5762.87
M40.820.672.6870.19
M50.750.561.380.39

Output of this sample input

The output that will be generated from the following input data will be:

ModelCorrelationR2RMSEAccuracyTopsis ScoreRank
M10.790.621.2560.890.6391330141342582.0
M20.660.442.8963.070.2125918296927795.0
M30.560.311.5762.870.4078456776130514.0
M40.820.672.6870.190.5191532395007473.0
M50.750.561.380.390.8282665851935811.0

Here the ranks are given as rank 1 is the best solution according to the weights and impacts given and rank 5 is the worst solution.


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-Deepansha-101803252-1.0.0.tar.gz (4.4 kB view hashes)

Uploaded Source

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