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.code import topsis topsis("data.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.9.tar.gz (2.4 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: Topsis-Harjot-101803217-1.1.9.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.9.tar.gz
Algorithm Hash digest
SHA256 21f7d9dae58915b6a0987d8c92d005950161a90197d62bc4ae21ad4d472e0264
MD5 fdae2d288b7e66ad13957aab47bb9f2e
BLAKE2b-256 eb7e9dc3869b0ee0863fb751546696c3877d566d66fab0ecd710ff7ead2122c6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: Topsis_Harjot_101803217-1.1.9-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.9-py3-none-any.whl
Algorithm Hash digest
SHA256 873ad2d9cecd31325e274328c4e46824954b775935f40ce12fe78fbb61310be2
MD5 6ce5e17a16b21158b226b25eb7c204ff
BLAKE2b-256 7248614ac534d7b0ed25456a734c65de167380daf853bd9c34a0a78747af8ce7

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