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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: Topsis-Harjot-101803217-1.1.4.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.4.tar.gz
Algorithm Hash digest
SHA256 ae865d6da53fe3ccc69363e93f90b10212ee5c8cfd2ecc68e87d707d6c7026a1
MD5 82b660616bd08e778398922b6150bf85
BLAKE2b-256 20d08a5cb7f73209045a73caa617b1a5dfcc6df1cf0af82c254cb13f3314238f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: Topsis_Harjot_101803217-1.1.4-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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 ef5a516b7cc5ee478a0aed3575e3fc22ea42ea54b7d03f638af083af66988a5c
MD5 639109e8f335ce7edf75801177d36d9c
BLAKE2b-256 5639e5ea87c73ace9cafcfb69f3a853078598fcc391468faa55ca52f1584d96f

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