Skip to main content

Topsis Calculation Package

Project description

topsis_nitanshjain_102017025

What is TOPSIS

Technique for Order Preference by Similarity to Ideal Solution (TOPSIS) originated in the 1980s as a multi-criteria decision making method.
TOPSIS chooses the alternative of shortest Euclidean distance from the ideal solution, and greatest distance from the negative-ideal solution.

Installation

pip install topsis-nitanshjain-102017025

Input csv format

Input file contain three or more columns
First column is the object/variable name
From 2nd to last columns contain numeric values only

How to use it

Command Prompt
topsis <InputDataFile> <Weights> <Impacts> <ResultFileName>
Example:
topsis inputfile.csv “1,1,1,1,2” “+,+,+,+,-” result.csv

Note: The weights and impacts should be ',' seperated, input file should be in pwd.

Functions, Parameters and Return Values

function = check_input()
parameters = none for this function
return values = input_file, weights (string), impacts (string), output_file
function = read_data()
parameters = input_file, weights, impacts
return values = dataframe, weights (list), impacts (list)
function = topsis_solve()
parameters = dataframe, weights, impacts, output_file
return values = dataframe, creates a csv file with the topsis rank and performance score

Sample input data

Model P1 P2 P3 P4 P5
M1 0.62 0.38 3.8 33.8 9.65
M2 0.75 0.56 5.7 50.3 14.33
M3 0.95 0.90 6.5 65.6 18.49
M4 0.61 0.37 6.2 43.6 12.70
M5 0.60 0.36 6.4 61.2 17.14
M6 0.76 0.58 5.3 68.0 18.66
M7 0.66 0.44 6.2 47.2 13.63
M8 0.80 0.64 5.7 37.1 11.06

Sample output data

Model P1 P2 P3 P4 P5 Performance Score Topsis Rank
M1 0.62 0.38 3.8 33.8 9.65 0.317272185 8
M2 0.75 0.56 5.7 50.3 14.33 0.452068871 4
M3 0.95 0.90 6.5 65.6 18.49 0.689037307 1
M4 0.61 0.37 6.2 43.6 12.70 0.340383903 7
M5 0.60 0.36 6.4 61.2 17.14 0.367206376 6
M6 0.76 0.58 5.3 68.0 18.66 0.481350901 3
M7 0.66 0.44 6.2 47.2 13.63 0.372999972 5
M8 0.80 0.64 5.7 37.1 11.06 0.51226635 2

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_nitanshjain_102017025-0.1.0.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

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

topsis_nitanshjain_102017025-0.1.0-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

Details for the file topsis_nitanshjain_102017025-0.1.0.tar.gz.

File metadata

File hashes

Hashes for topsis_nitanshjain_102017025-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a4f89001569423c86abf6813c45b505ee49b942b980c57b34a122932d444e51c
MD5 e311e9ffda78cb782996c54239d50b28
BLAKE2b-256 bfc15f8949911fce37cdfc4dc1bd5ea0be192f96b8e0de803dc878f060c6f6b9

See more details on using hashes here.

File details

Details for the file topsis_nitanshjain_102017025-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for topsis_nitanshjain_102017025-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d7da2a292d0a1da8b298340ac558f56d2650e1aeff67fefc401ddc4c05a167fe
MD5 73618f713ccd1b0db1b779f94821acd3
BLAKE2b-256 7f85c7d9a4c062bd7e7512172a5f7e6c71b66c0bc65a32e192452444275b0233

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