Skip to main content

The Technique for Order of Preference by Similarity to the Ideal Solution

Project description

TOPSIS

Code by: Ansh Garg


## What is TOPSIS

TOPSIS stands for ‘The Technique for Order of Preference by Similarity to the Ideal Solution’ is a multi-criteria decision analysis(MCDA) method. It is a method of compensatory aggregation that compares a set of alternatives by identifying weights for each criterion, normalising scores for each criterion and calculating the geometric distance between each alternative and the ideal alternative, which is the best score in each criterion.

How to run

Before running, make sure you have pandas installed on your system

Open Terminal and input the following commands

pip install Topsis-Ansh-101803295

To get started quickly, just use the following:

from TOPSIS-Ansh-101803295.topsis import topsis
topsis('inputfilename','Weights','Impacts','Outputfilename')

make ensure the weights and impacts should be in ""

eg: "1,1,1,1" and "+,-,+,-"

Pre-requisite

The data should be enclosed in the csv file. There must be more than 2 columns

Result

the output(outputfilename) is saved in the project folder with extra 2 columns with topsis score and rank.

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 Ansh Garg

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-Ansh-101803295-1.0.0.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

TOPSIS_Ansh_101803295-1.0.0-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

Details for the file TOPSIS-Ansh-101803295-1.0.0.tar.gz.

File metadata

  • Download URL: TOPSIS-Ansh-101803295-1.0.0.tar.gz
  • Upload date:
  • Size: 3.2 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.7.3

File hashes

Hashes for TOPSIS-Ansh-101803295-1.0.0.tar.gz
Algorithm Hash digest
SHA256 4fb4d673ab5dd28031cead8ea086df0c78821242c9727ea3ff951b82766b2a0b
MD5 a6a9acd81a93877ff6aabbc98109f15f
BLAKE2b-256 accff6b402eeefbf9b1a48add3ff03c9571b6e3a46ddbe9d69b79b749c2ff0ee

See more details on using hashes here.

File details

Details for the file TOPSIS_Ansh_101803295-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: TOPSIS_Ansh_101803295-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 4.5 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.7.3

File hashes

Hashes for TOPSIS_Ansh_101803295-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3435cb7677716d0700fc9b38f849fab3c5fa019dd90d04e38fa464dbaa9f3be1
MD5 27da3133ccf41ac848b1bd02bb7c4a6c
BLAKE2b-256 a62b5199464fb11022b45a0f57165cc80d46a059bfe04a0ceed35fe5b977b8b7

See more details on using hashes here.

Supported by

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