Skip to main content

TOPSIS

Code by: Arth Duggal


## What is TOPSIS

TOPSIS is a method of compensatory aggregation that compares a set of alternatives by identifying weights for each criterion, normalising scores for each criterion and calculating the geometric distance between each alternative and the ideal alternative, which is the best score in each criterion. An assumption of TOPSIS is that the criteria are monotonically increasing or decreasing. Normalisation is usually required as the parameters or criteria are often of incongruous dimensions in multi-criteria problems. Compensatory methods such as TOPSIS allow trade-offs between criteria, where a poor result in one criterion can be negated by a good result in another criterion. This provides a more realistic form of modelling than non-compensatory methods, which include or exclude alternative solutions based on hard cut-offs. An example of application on nuclear power plants is provided in.TOPSIS stands for ‘The Technique for Order of Preference by Similarity to the Ideal Solution’ is a multi-criteria decision analysis(MCDA) method.

How to run

Before running, make sure you have pandas installed on your system

Open Terminal and input the following commands

pip install Topsis-Arth-101803214

python

from topsis.topsis1 import topsis topsis("input.csv","1,2,1,2","+,+,-,+","output.csv")

Sample Input

This input was used to test the module

ModelCorrRseqRMSEAccuracy
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

ModelCorrRseqRMSEAccuracyTopsis ScoreRank
M10.790.621.2560.890.6391332.0
M20.660.442.8963.070.2125925.0
M30.560.311.5762.870.4078464.0
M40.820.672.6870.190.5191533.0
M50.750.561.380.390.8282671.0

License

© 2020 Arth Duggal

This repository is licensed under the MIT license. See LICENSE for details.

Release files for Topsis-Arth-101803214 1.1.3

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-Arth-101803214 1.1.3
File Size Uploaded
Topsis-Arth-101803214-1.1.3.tar.gz 2.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for Topsis-Arth-101803214 1.1.3
File Interpreter ABI Platform
Topsis_Arth_101803214-1.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 5.8 kB

Release files / Topsis-Arth-101803214-1.1.3.tar.gz

Download URL Topsis-Arth-101803214-1.1.3.tar.gz
Size 2.6 kB
Tags Source
SHA-256 checksum
How to use checksums
a54a4193eadeb0e62fbbbb34c59ec0798b379c228bd0d74367c9403b1ab4a330
BLAKE2b-256 checksum
How to use checksums
9a2791381a0ec9d01c6636ec735b482098d46513f7ea67ab77a1cbbe1932d493
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.5

Release files / Topsis_Arth_101803214-1.1.3-py3-none-any.whl

Download URL Topsis_Arth_101803214-1.1.3-py3-none-any.whl
Size 3.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0c3d759c725275455222b5f7be21552a9f88b55f0b850a068263725bf169e8df
BLAKE2b-256 checksum
How to use checksums
90117a4adb80867014911875f6f2c4cfa72360a5416c900034dbeb9ded265a62
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.5

Release history Release notifications | RSS feed

This release

1.1.3 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