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:
Model | Correlation | R2 | 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 of this sample input
The output that will be generated from the following input data will be:
Model | Correlation | R2 | RMSE | Accuracy | Topsis Score | Rank |
---|---|---|---|---|---|---|
M1 | 0.79 | 0.62 | 1.25 | 60.89 | 0.639133014134258 | 2.0 |
M2 | 0.66 | 0.44 | 2.89 | 63.07 | 0.212591829692779 | 5.0 |
M3 | 0.56 | 0.31 | 1.57 | 62.87 | 0.407845677613051 | 4.0 |
M4 | 0.82 | 0.67 | 2.68 | 70.19 | 0.519153239500747 | 3.0 |
M5 | 0.75 | 0.56 | 1.3 | 80.39 | 0.828266585193581 | 1.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
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
Hashes for TOPSIS-Deepansha-101803252-1.0.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | de3376b59d82cf3a309a7e282b59eb6b0b7bbd0e1cb80402dd1c861eca323ef8 |
|
MD5 | 963d5d41b94655dbdbdba5e979cbde21 |
|
BLAKE2b-256 | afa8a9e4dd8b2c69da672871cd853d523990c20fdd81a98295cc51d35e7447af |