Skip to main content

This is a Python Package implementing TOPSIS used for multi-criteria decision analysis method

Project description

Project Description

Topsis-Nandini-102017101

Topsis-Nandini-102017101 is a Python Package implementing Topsis method used for multi-criteria decision analysis. Topsis stands for ‘Technique for Order of Preference by Similarity to Ideal Solution’.
Topsis-Nandini-102017101 intends to make the process of TOPSIS simple in python.

Key features of the package are -

  • Easy to use
  • Numpy Based
  • Ideal for Students

Installation

Use the package manager pip to install Topsis-Nandini-102017101

Syntax

Enter csv filename followed by .csv extentsion, then enter the weights vector with vector values separated by commas, followed by the impacts vector with comma separated signs (+,-) and output file name with .csv extension

topsis <InputDataFile> <Weights> <Impacts> <ResultFileName>

Example:

topsis inputfile.csv “1,1,1,2” “+,+,-,+” result.csv

or vectors can be entered without " "

topsis inputfile.csv 1,1,1,2 +,+,-,+ result.csv

But the second representation does not provide for inadvertent spaces between vector values. So, if the input string contains spaces, make sure to enclose it between double quotes (" ").

Example

Sample input data

Fund Name P1 P2 P3 P4 P5
M1 0.65 0.42 5.3 43.8 12.54
M2 0.94 0.88 4 61.5 16.83
M3 0.72 0.52 3.2 69.7 18.54
M4 0.89 0.79 5.4 49 14.02
M5 0.75 0.56 6.9 49.4 14.4
M6 0.6 0.36 4.2 68.3 18.37
M7 0.89 0.79 6.7 44.6 13.25
M8 0.79 0.62 3.8 51.7 14.23

weights vector = [ 1 , 1 , 1 , 1 , 1 ]

impacts vector = [ + , + , + , + , + ]

Sample output data

Fund Name P1 P2 P3 P4 P5 Topsis Score Rank
M1 0.65 0.42 5.3 43.8 12.54 0.287855029 8
M2 0.94 0.88 4 61.5 16.83 0.631106388 2
M3 0.72 0.52 3.2 69.7 18.54 0.412672373 5
M4 0.89 0.79 5.4 49 14.02 0.605503106 3
M5 0.75 0.56 6.9 49.4 14.4 0.536194294 4
M6 0.6 0.36 4.2 68.3 18.37 0.36630047 7
M7 0.89 0.79 6.7 44.6 13.25 0.635938379 1
M8 0.79 0.62 3.8 51.7 14.23 0.373853804 6

Please Note:

  • Categorical values are not handled
  • Enter the path for your input csv file
    -Enter the weights vector with each weight separated by commas
    -Enter the impact vector with each impact separated by commas
    -Enter the name of csv file in which you want to store output dataframe.

License

MIT

Free Software, Hell Yeah!

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-Nandini-102017101-0.0.3.tar.gz (5.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