Skip to main content

TOPSIS Package in Python

Submitted by : Sehajpreet Kaur Roll no : 101803191

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

>> pip install TOPSIS-SehajpreetKaur-101803191
>> 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.


Release files for TOPSIS-SehajpreetKaur-101803191 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for TOPSIS-SehajpreetKaur-101803191 0.0.1
File Size Uploaded
TOPSIS-SehajpreetKaur-101803191-0.0.1.tar.gz 4.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for TOPSIS-SehajpreetKaur-101803191 0.0.1
File Interpreter ABI Platform
TOPSIS_SehajpreetKaur_101803191-0.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 9.0 kB

Release files / TOPSIS-SehajpreetKaur-101803191-0.0.1.tar.gz

Download URL TOPSIS-SehajpreetKaur-101803191-0.0.1.tar.gz
Size 4.4 kB
Tags Source
SHA-256 checksum
How to use checksums
088776766606bf0e2d31368078d5f88b27c46e86e376379770009bf73d65e718
BLAKE2b-256 checksum
How to use checksums
f211185a2b2f6ea58cf4cf69f6536931bd59f52638ca13c31155d182f292ce02
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / TOPSIS_SehajpreetKaur_101803191-0.0.1-py3-none-any.whl

Download URL TOPSIS_SehajpreetKaur_101803191-0.0.1-py3-none-any.whl
Size 4.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4777cb2f222ddfa16d6ad65bc4f2c968d62446b5b72f4e0d7d792836ec81db28
BLAKE2b-256 checksum
How to use checksums
058295f12a2471b637b8a6a6637ace097e5e1798fafb7e77a0dd5be6f3cd3ace
Upload date
Uploaded using Trusted Publishing?
What is 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

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page