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,2,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.3.tar.gz (2.4 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

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

Hashes for Topsis-Harjot-101803217-1.1.3.tar.gz
Algorithm Hash digest
SHA256 9dbcb06d5e9b20e6a70a2d597142fc56a1708e9edfb30f5e777e5b2b1a752e31
MD5 e1ab41e808c4476cfdcc7237327a7e6f
BLAKE2b-256 03bb90a4d11a6123c4ab197fe83b29f637fa644557d3dce192b20142a70da32d

See more details on using hashes here.

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

Hashes for Topsis_Harjot_101803217-1.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 a560e04cf3fa34d74d06560977d16cafa44bf4e9970511e0910fed5756686d01
MD5 e7f6eacbd86d5297ac86b06c7200b770
BLAKE2b-256 746dbc3aabe78f55f0bc112c8919075c13e942b41d51d40b12ec6a16b0856989

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