Skip to main content

Python Package for TOPSIS

Project description

TOPSIS Package in Python

Submitted by : Nikhil Garg Roll no : 101803106

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-Nikhil-101803106 can be run though the command line as follows:

>> pip install TOPSIS-Nikhil-101803103
>> 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-Nikhil-101803106-1.0.0.tar.gz (4.6 kB view details)

Uploaded Source

File details

Details for the file TOPSIS-Nikhil-101803106-1.0.0.tar.gz.

File metadata

  • Download URL: TOPSIS-Nikhil-101803106-1.0.0.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0.post20200714 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3

File hashes

Hashes for TOPSIS-Nikhil-101803106-1.0.0.tar.gz
Algorithm Hash digest
SHA256 d9a039afed7c45616cec47aa4886b69c71dadfda4399c47e303125911d849dc1
MD5 279434c0acd11f65395045c10cd525e8
BLAKE2b-256 a93c503fdd93feef2d6304b7dbd3a91e4c841da1b81a366afd9bd8ae58693341

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