Skip to main content

Command line implementation of TOPSIS for MCDM problems

Project description

Package Description

This package is built as a submission to Assignment 1

Submitted by: Shivank Bhatia (102303655), 3C45

Definition: TOPSIS, acronym for Technique for Order Preference by Similarity to Ideal Solution, is a multi-criteria decision-making (MCDM) method used to rank alternatives by selecting the option that is closest to the ideal solution and farthest from the worst (negative ideal) solution.

Installation

Use the package manager pip to install topsis-shivank-102303655

pip install topsis-shivank-102303655==0.2.2

⚙️ Usage

topsis data.csv 1,1,1,1,1 +,+,-,+,+ result.csv

where,

  • data.csv is your input file
  • Weights to be assigned to each feature
  • Impacts to optimize each feature ('+': Maximize, '-': Minimize)
  • Output file path to save the results

🪴Example

weights = [1,1,1,1,1] impacts = [+,+,-,+,+]

Input Dataset TOPSIS Output

📄 data.csv

Fund Name P1 P2 P3 P4 P5
M1 0.75 0.56 3.9 41.1 11.58
M2 0.73 0.53 3.4 61.1 16.44
M3 0.65 0.42 5.2 64.5 17.69
M4 0.77 0.59 3.8 40.6 11.44
M5 0.81 0.66 5.3 38.1 11.22
M6 0.81 0.66 5.5 57.3 16.07
M7 0.87 0.76 6.7 51.5 14.96
M8 0.94 0.88 5.5 67.9 18.81

📊 result.csv

Fund Name P1 P2 P3 P4 P5 Topsis Score Rank
M1 0.75 0.56 3.9 41.1 11.58 0.4086 7
M2 0.73 0.53 3.4 61.1 16.44 0.5806 2
M3 0.65 0.42 5.2 64.5 17.69 0.4485 5
M4 0.77 0.59 3.8 40.6 11.44 0.4303 6
M5 0.81 0.66 5.3 38.1 11.22 0.3549 8
M6 0.81 0.66 5.5 57.3 16.07 0.5226 3
M7 0.87 0.76 6.7 51.5 14.96 0.4648 4
M8 0.94 0.88 5.5 67.9 18.81 0.7283 1

🗒️ Notes

The package handles the following:

  • Correct number of parameters (inputFileName, Weights, Impacts, resultFileName).
  • Show the appropriate message for wrong inputs.
  • Handling of “File not Found” exception
  • The input file must contain three or more columns.
  • From 2nd to last columns must contain numeric values only (Handling of non-numeric values)
  • The number of weights, number of impacts and number of columns (from 2nd to last columns) must be the same.
  • Impacts must be either +ve or -ve.
  • Impacts and weights must be separated by ‘,’ (comma).

License

MIT Licence

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_shivank_102303655-0.2.3.tar.gz (4.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_shivank_102303655-0.2.3-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file topsis_shivank_102303655-0.2.3.tar.gz.

File metadata

File hashes

Hashes for topsis_shivank_102303655-0.2.3.tar.gz
Algorithm Hash digest
SHA256 350a99cab8ced8f1ebf2e0510930549566b084f90f7fb8e3a8e8b9a0e968c75a
MD5 a26f4bde2c85d9d4dd9e369285c7bcd7
BLAKE2b-256 92af558b1a5a77a37eabaffd5574e51c3080457e9a399d7f268e7fbcac483415

See more details on using hashes here.

File details

Details for the file topsis_shivank_102303655-0.2.3-py3-none-any.whl.

File metadata

File hashes

Hashes for topsis_shivank_102303655-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 6e27916dd5f4e01a481ea106188279717ab6e8864b9907dd44a3fbccf33764fd
MD5 31d575ac38e147a00545299f72ea1e86
BLAKE2b-256 3df925d69e61c1b7884c24595368a87cf1204ef578a8b249287522070447dacb

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