Skip to main content

topsis

Project description

TOPSIS Package in Python

Submitted by: Kartik Madan

Roll no: 102003565


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-kartik-102003565 can be run though the command line as follows:

>> pip install topsis-kartik-102003565
>>python topsis data.csv "1,1,1,1" "+,+,-,+" result

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.

Fund NameP1P2P3P4
M125016125
M22001683
M330032164
M42753284
M522516162

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.

Sample Output

The output that generated from the following input will be:

ModelP1P2P3P4Topsis ScoreRank
M1250161250.5342773
M220016830.3083685
M3300321640.6916321
M427532840.5347372
M5225161620.4010464

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-kartik-102003565-1.0.1.tar.gz (4.3 kB view hashes)

Uploaded Source

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