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 details)

Uploaded Source

File details

Details for the file topsis-kartik-102003565-1.0.1.tar.gz.

File metadata

  • Download URL: topsis-kartik-102003565-1.0.1.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.7

File hashes

Hashes for topsis-kartik-102003565-1.0.1.tar.gz
Algorithm Hash digest
SHA256 bb2d98c8cb6d5d5bf9e05d30d24977716ed04f7695bf641f8b0c5bdbc7a58bb0
MD5 99604fa0974cda809eae2654f233bc99
BLAKE2b-256 8ed441b381da0602d96ad60e1844526e0917f20930ec59b0628507b42d18344a

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