Skip to main content

TOPSIS

Code by: Sheramir


## 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_Sheramir_101803549

To get started quickly, just use the following:

from TOPSIS_Sheramir_101803549.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 Sheramir

This repository is licensed under the MIT license. See LICENSE for details.

Release files for TOPSIS-Sheramir-101803549 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for TOPSIS-Sheramir-101803549 1.0.1
File Size Uploaded
TOPSIS_Sheramir_101803549-1.0.1.tar.gz 3.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for TOPSIS-Sheramir-101803549 1.0.1
File Interpreter ABI Platform
TOPSIS_Sheramir_101803549-1.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 7.7 kB

Release files / TOPSIS_Sheramir_101803549-1.0.1.tar.gz

Download URL TOPSIS_Sheramir_101803549-1.0.1.tar.gz
Size 3.2 kB
Tags Source
SHA-256 checksum
How to use checksums
52b668732dff3281ac3b3b4266d506e1fcc13199f6dc1ec4674f9f8fac9c2ce0
BLAKE2b-256 checksum
How to use checksums
fc1d1f2c81d34c4c849c7f20833bd3e25b72100dba5b3746e46b6caf5487563e
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / TOPSIS_Sheramir_101803549-1.0.1-py3-none-any.whl

Download URL TOPSIS_Sheramir_101803549-1.0.1-py3-none-any.whl
Size 4.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2da41b190c9c7014cde1ef35f3f87ee7ce2f571532bd65a4f13a195de6ccc4bf
BLAKE2b-256 checksum
How to use checksums
54677cfd30a9469a5e0e21fa138d4d84cbfbb618af34bdff02af7fff28e01416
Upload date
Uploaded using Trusted Publishing?
What is 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

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page