Skip to main content

Topsis Package

Project description

Deepak-102003483

What is TOPSIS

Topsis stands for Technique for Order Preference by Similarity to Ideal Solution (TOPSIS). Topsis was originated back in the 1980s and was used for making decisions which are subjected to multiple-criteria.
TOPSIS takes in the use of shortest Euclidean distance from the ideal solution, and greatest distance from the negative-ideal solution.

Package Installation

pip install Deepak-102003483==1.1.10

Input File in CSV Format

Input file must contain Three or more columns
First column contains the Object Name / Variable Name
Rest of the other columns contains only numeric values

Usage Method

Command Prompt

python <python_file> <Input_Data_File> <Weights> <Impacts> <Result_File_Name>


python_file -> Python Code file for Topsis Calculation
Input_Data_File -> CSV file name
Weights -> Weights for each Column
Impacts -> Maximaization('+'), Minimization('-')
Result_File_Name -> CSV file name to store result

Example:

python 102003483.py 102003483-data.csv “1,1,1,1,1” “+,-,+,-,+” 102003483-result-1.csv
python 102003483.py 102003483-data.csv “2,2,3,3,4” “-,+,-,+,-” 102003483-result-2.csv



Note: The Weights and Impacts should be comma (',') seperated and Input CSV file should be in pwd(Present Working Directory).

Functions and Return Values

function = topsis_102003483()
return values = Creates a CSV file with the Topsis Rank and Performance Score

Sample input data

Fund Name 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

Fund Name P1 P2 P3 P4 P5 Topsis Score 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

Deepak_102003483-1.1.10.tar.gz (4.7 kB view details)

Uploaded Source

File details

Details for the file Deepak_102003483-1.1.10.tar.gz.

File metadata

  • Download URL: Deepak_102003483-1.1.10.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.2

File hashes

Hashes for Deepak_102003483-1.1.10.tar.gz
Algorithm Hash digest
SHA256 2d4cf7489ac967668dc469b823e5dfe5273dbb6d7557ade8e0372cda25bcaa84
MD5 5f44c6e67ea8a9cd67c4931bc878ef54
BLAKE2b-256 dbcd0ce964f75958c5e7dff0da5341a3924acd94aecc3a57a8c2b492763f085a

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