A Python package to find TOPSIS for multi-criteria decision analysis method
Project description
TOPSIS-Python
Submitted By: Girik Garg 102003178
What is TOPSIS
Technique for Order Preference by Similarity to Ideal Solution (TOPSIS) originated in the 1980s as a multi-criteria decision making method. TOPSIS chooses the alternative of shortest Euclidean distance from the ideal solution, and greatest distance from the negative-ideal solution. More details at wikipedia.
How to use this package:
TOPSIS-GIRIK-GARG-102003178 can be run as in the following example:
In Command Prompt to run the code:
topsis data.csv "1,1,1,1" "+,+,-,+" out.csv
Sample dataset
The decision matrix (a) should be constructed with each row representing a Model alternative, and each column representing a criterion like Fund Name , P1 ,P2 , P3 , P4 , P5.
| Model | Correlation | R2 | RMSE | Accuracy |
|---|---|---|---|---|
| M1 | 0.8 | 0.64 | 3.5 | 37.5 |
| M2 | 0.86 | 0.74 | 3.4 | 42.2 |
| M3 | 0.69 | 0.48 | 5.7 | 70 |
| M4 | 0.65 | 0.42 | 5.7 | 65.5 |
| M5 | 0.9 | 0.81 | 6.6 | 39.1 |
| M6 | 0.76 | 0.58 | 4 | 53.5 |
| M7 | 0.69 | 0.48 | 6.2 | 51.3 |
| M8 | 0.65 | 0.42 | 6 | 50.2 |
Output
Row_NO Performance_score Rank
1 0.436737 7
2 0.389937 8
3 0.565650 4
4 0.590487 3
5 0.522924 5
6 0.451344 6
7 0.637889 1
8 0.635536 2
The rankings are displayed in the form of a table using a package 'tabulate', with the 1st rank offering us the best decision, and last rank offering the worst decision making, according to TOPSIS method.
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
File details
Details for the file TOPSIS-GIRIK-102003178-1.3.7.tar.gz.
File metadata
- Download URL: TOPSIS-GIRIK-102003178-1.3.7.tar.gz
- Upload date:
- Size: 7.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9abb68700148c709050ae29b6cb733e30370e2b010756533c62116d1318e65ab
|
|
| MD5 |
72c6850debc74757ae4b90c82d166314
|
|
| BLAKE2b-256 |
e5f69fbd254f1cf4e418236e9d99cfa369fcd440b6f488e5291df7e4feff0a0b
|