Implementation of Topsis
Project description
TOPSIS
Code by: Harjot Singh
Introduction
The Technique for Order Preference by Similarity to Ideal Solution (TOPSIS) developed by Hwang & Yoon,is a technique to evaluate the performance of alternatives through the similarity with the ideal solution. According to this technique, the best alternative would be one that is closest to the positive-ideal solution and farthest from the negative-ideal solution. The positive-ideal solution is one that maximizes the benefit criteria and minimizes the cost criteria. The negative-ideal solution maximizes the cost criteria and minimizes the benefit criteria. In summary, the positive-ideal solution is composed of all best values attainable of criteria, and the negative-ideal solution consists of all the worst values attainable of criteria.
How to run
Before running, make sure you have pandas installed on your system
Open Terminal and input the following commands
pip install Topsis-Harjot-101803217
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 Harjot Singh
This repository is licensed under the MIT license. See LICENSE for details.
Project details
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
File details
Details for the file Topsis-Harjot-101803217-1.1.3.tar.gz
.
File metadata
- Download URL: Topsis-Harjot-101803217-1.1.3.tar.gz
- Upload date:
- Size: 2.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9dbcb06d5e9b20e6a70a2d597142fc56a1708e9edfb30f5e777e5b2b1a752e31 |
|
MD5 | e1ab41e808c4476cfdcc7237327a7e6f |
|
BLAKE2b-256 | 03bb90a4d11a6123c4ab197fe83b29f637fa644557d3dce192b20142a70da32d |
File details
Details for the file Topsis_Harjot_101803217-1.1.3-py3-none-any.whl
.
File metadata
- Download URL: Topsis_Harjot_101803217-1.1.3-py3-none-any.whl
- Upload date:
- Size: 3.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a560e04cf3fa34d74d06560977d16cafa44bf4e9970511e0910fed5756686d01 |
|
MD5 | e7f6eacbd86d5297ac86b06c7200b770 |
|
BLAKE2b-256 | 746dbc3aabe78f55f0bc112c8919075c13e942b41d51d40b12ec6a16b0856989 |