Implements Topsis
Project description
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
Model | Corr | Rseq | RMSE | Accuracy |
---|---|---|---|---|
M1 | 0.79 | 0.62 | 1.25 | 60.89 |
M2 | 0.66 | 0.44 | 2.89 | 63.07 |
M3 | 0.56 | 0.31 | 1.57 | 62.87 |
M4 | 0.82 | 0.67 | 2.68 | 70.19 |
M5 | 0.75 | 0.56 | 1.3 | 80.39 |
Output
Model | Corr | Rseq | RMSE | Accuracy | Topsis Score | Rank |
---|---|---|---|---|---|---|
M1 | 0.79 | 0.62 | 1.25 | 60.89 | 0.639133 | 2.0 |
M2 | 0.66 | 0.44 | 2.89 | 63.07 | 0.212592 | 5.0 |
M3 | 0.56 | 0.31 | 1.57 | 62.87 | 0.407846 | 4.0 |
M4 | 0.82 | 0.67 | 2.68 | 70.19 | 0.519153 | 3.0 |
M5 | 0.75 | 0.56 | 1.3 | 80.39 | 0.828267 | 1.0 |
License
© 2020 Arth Duggal
This repository is licensed under the MIT license. See LICENSE for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for Topsis-Arth-101803214-1.1.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | a54a4193eadeb0e62fbbbb34c59ec0798b379c228bd0d74367c9403b1ab4a330 |
|
MD5 | 2c2489d245697663b47c4cc4e2949991 |
|
BLAKE2b-256 | 9a2791381a0ec9d01c6636ec735b482098d46513f7ea67ab77a1cbbe1932d493 |
Hashes for Topsis_Arth_101803214-1.1.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0c3d759c725275455222b5f7be21552a9f88b55f0b850a068263725bf169e8df |
|
MD5 | 8d14e294b0ce733f6bd769fa318dea6a |
|
BLAKE2b-256 | 90117a4adb80867014911875f6f2c4cfa72360a5416c900034dbeb9ded265a62 |