Skip to main content

This package can be used to calculate the topsis score of multiple component data and rank them accordingly

Project description

TOPSIS Package in Python

Submitted by: Satyam Verma

Roll no: 101803324

UCS538


TOPSIS

TOPSIS is an acronym that stands for ‘Technique of Order Preference Similarity to the Ideal Solution’ and is a pretty straightforward MCDA method. As the name implies, the method is based on finding an ideal and an anti-ideal solution and comparing the distance of each one of the alternatives to those.


How to use

The package Topsis-Satyam-101803324 can be run though the command line as follows:

>> pip install Topsis-Satyam-101803324
>> >> topsis data.csv "1,1,1,1" "+,+,-,+" result.csv

Sample Input

The decision matrix should be constructed with each row representing a Model alternative, and each column representing a criterion like Accuracy, R2, Root Mean Squared Error, Correlation, and many more.

ModelCorrelationR2RMSEAccuracy
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

Weights (`weights`) is not already normalised will be normalised later in the code.

Information of benefit positive(+) or negative(-) impact criteria should be provided in impacts.

Output of this sample input

The output that will be generated from the following input data will be:

ModelCorrelationR2RMSEAccuracyTopsis ScoreRank
M10.790.621.2560.890.63913301413425902.0
M20.660.442.8963.070.212591829692779005.0
M30.560.311.5762.870.40784567761305204.0
M40.820.672.6870.190.51915323950074703.0
M50.750.561.380.390.82826658519358101.0

The output file contains columns of input file along with two additional columns having **Topsis_score** and **Rank**. Here the ranks are given as rank 1 is the best solution according to the weights and impacts given and rank 5 is the worst solution.

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-Satyam-101803324-1.0.1.tar.gz (4.0 kB view details)

Uploaded Source

File details

Details for the file Topsis-Satyam-101803324-1.0.1.tar.gz.

File metadata

  • Download URL: Topsis-Satyam-101803324-1.0.1.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.6rc1

File hashes

Hashes for Topsis-Satyam-101803324-1.0.1.tar.gz
Algorithm Hash digest
SHA256 f98337deff748fb02a9b6807e7e1a8946936c059a53d340c625fc95c85b84a82
MD5 cafe4760f7d253e20cb6f245fbd52ffd
BLAKE2b-256 fbcdb127d40f0677bace112916d32ae076e10b9f9f649b9833b2c12f2101e689

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