Skip to main content

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,1,1,2","+,+,-,+","output.csv")

Sample Input

This input was used to test the module

ModelCorrRseqRMSEAccuracy
M10.790.621.2560.89
M20.660.442.8963.07
M30.560.311.5762.87
M40.820.672.6870.19
M50.750.561.380.39

Output

ModelCorrRseqRMSEAccuracyTopsis ScoreRank
M10.790.621.2560.890.6391332.0
M20.660.442.8963.070.2125925.0
M30.560.311.5762.870.4078464.0
M40.820.672.6870.190.5191533.0
M50.750.561.380.390.8282671.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

Topsis-Harjot-101803217-1.1.8.tar.gz (2.4 kB view details)

Uploaded Source

Built Distribution

Topsis_Harjot_101803217-1.1.8-py3-none-any.whl (3.1 kB view details)

Uploaded Python 3

File details

Details for the file Topsis-Harjot-101803217-1.1.8.tar.gz.

File metadata

  • Download URL: Topsis-Harjot-101803217-1.1.8.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

Hashes for Topsis-Harjot-101803217-1.1.8.tar.gz
Algorithm Hash digest
SHA256 d88b5c3bf6f4bd996d6afb493b83c4eda466ea893b66c804bd00850c1161ba09
MD5 a003ba3626d8bc83fd8bc14349be6c94
BLAKE2b-256 e820ea1d5690d5c4a9613c9a394bf18a5e7af925f71d3e355bf97981703c6c1a

See more details on using hashes here.

File details

Details for the file Topsis_Harjot_101803217-1.1.8-py3-none-any.whl.

File metadata

  • Download URL: Topsis_Harjot_101803217-1.1.8-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

Hashes for Topsis_Harjot_101803217-1.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 f38afa79d1144501c6fe3f8f834977fb49f8298513e0bc88eedb211a9ddbd39e
MD5 43169ac46f9884e8ca391bb4978e79ed
BLAKE2b-256 8a616a4d9749af63c7146f81744f298bfdd4d25f23861dc5def36ee27f52f911

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page