This package can be used to calculate the topsis score of multiple component data and rank them accordingly
Project description
TOPSIS Package in Python
Submitted by: Girish Gupta
Roll no: 102003323
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-Girish-102003323 can be run though the command line as follows:
>> pip install Topsis-Girish-102003323
>>python topsis data.csv "1,1,1,1" "+,+,-,+" result.csv
Sample Input
The decision matrix should be constructed with each row representing a Model alternative, and each column representing a criterion like Accuracy, R2, Root Mean Squared Error, Correlation, and many more.
| 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 |
Weights `weights` is not already normalised will be normalised later in the code.
Information of benefit positive(+) or negative(-) impact criteria should be provided in impacts.
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.7722097345612788 | 2.0 |
| M2 | 0.66 | 0.44 | 2.89 | 63.07 | 0.22559875426413367 | 5.0 |
| M3 | 0.56 | 0.31 | 1.57 | 62.87 | 0.43889731728018605 | 4.0 |
| M4 | 0.82 | 0.67 | 2.68 | 70.19 | 0.5238778712729114 | 3.0 |
| M5 | 0.75 | 0.56 | 1.3 | 80.39 | 0.8113887082429979 | 1.0 |
The output file contains columns of input file along with two additional columns having **Topsis_score** and **Rank** . 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
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file Topsis-Girish-102003323-0.1.5.tar.gz.
File metadata
- Download URL: Topsis-Girish-102003323-0.1.5.tar.gz
- Upload date:
- Size: 4.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
12d47f098d5fee0202ea612274de495a54ceec0a415f7c69c54472442ce670b4
|
|
| MD5 |
d5d04122a6d2d018f3d4e3bb384ca625
|
|
| BLAKE2b-256 |
b00436b3b30c7a80f626d66117f7472de2a629ec81c575a47d5eaffddf31fa1d
|
File details
Details for the file Topsis_Girish_102003323-0.1.5-py3.9.egg.
File metadata
- Download URL: Topsis_Girish_102003323-0.1.5-py3.9.egg
- Upload date:
- Size: 6.2 kB
- Tags: Egg
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2157b6b519a178d198e137eaab66b2ecafa5497cb21e15c4af156351b6e98e25
|
|
| MD5 |
35aac53e21843e2482f69ab1d4a10587
|
|
| BLAKE2b-256 |
ec7b4d9aaeeedd22e4db7ec3a2af7fcfd7288a4a75e50acbf67cc95d42d5c132
|
File details
Details for the file Topsis_Girish_102003323-0.1.5-py3-none-any.whl.
File metadata
- Download URL: Topsis_Girish_102003323-0.1.5-py3-none-any.whl
- Upload date:
- Size: 5.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e0b22167b289a81e4f84e771c3bc62f4fccb867a86a124398a0a62c84e4165a7
|
|
| MD5 |
1754813b805ee8159de7c1855343a2fd
|
|
| BLAKE2b-256 |
8b4792e108bfe2559c2044478ca7d255c27cd9c337bb4414ddc82aab447dec0e
|