Skip to main content

A Python package that implements the TOPSIS multi-criteria decision-making method.

Project description

topsis-ishan-102313022

topsis-ishan-102313022 is a Python package for solving Multiple Criteria Decision Making (MCDM) problems using the Technique for Order of Preference by Similarity to Ideal Solution (TOPSIS).

It helps rank alternatives based on their relative closeness to the ideal solution and is useful in real-world decision-making scenarios such as:

  • Choosing the best product
  • Selecting the best candidate
  • Ranking investment options
  • Engineering design evaluation
  • Research and management decision analysis

Installation

Use the Python package manager pip to install the package:

pip install topsis-ishan-102313022

Usage

Provide the input CSV file followed by the weights vector and impacts vector.

Command Format
topsis input.csv "w1,w2,w3,..." "+,-,+,..." output.csv

Example
topsis sample.csv "1,1,1,1" "+,-,+,+" result.csv


Vectors can also be provided without quotes if they contain no spaces:

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


To view help information:

topsis -h

Example Dataset
sample.csv

A CSV file showing data for different mobile handsets with varying features:

Model	Storage Space (GB)	Camera (MP)	Price ($)	Looks (out of 5)
M1	         16	              12	     250	         5
M2	         16	               8	     200	         3
M3	         32	              16	     300	         4
M4	         32	               8	     275	         4
M5	         16	              16	     225	         2
Weights Vector
[0.25, 0.25, 0.25, 0.25]

Impacts Vector
[+, +, -, +]

Sample Command
topsis sample.csv "0.25,0.25,0.25,0.25" "+,+,-,+" output.csv

Sample Output
----------------------------
       TOPSIS RESULTS
----------------------------
Alternative   Score     Rank
1             0.534277  3
2             0.308368  5
3             0.691632  1
4             0.534737  2
5             0.401046  4


The output CSV file will contain two additional columns:

Topsis Score

Rank

Important Notes

The first column of the CSV file must contain the alternative names (e.g., M1, M2, ...).

All remaining columns must contain numerical values only.

The number of weights must match the number of criteria columns.

The number of impacts must match the number of criteria columns.

Impacts must be either:

+ for benefit criteria

- for cost criteria

Do not include categorical (non-numeric) data in criteria columns.

Author

Developed by Ishan Bhat

License

This project is released for academic and educational use.

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_ishan_102313022-1.0.0.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_ishan_102313022-1.0.0-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file topsis_ishan_102313022-1.0.0.tar.gz.

File metadata

  • Download URL: topsis_ishan_102313022-1.0.0.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.4

File hashes

Hashes for topsis_ishan_102313022-1.0.0.tar.gz
Algorithm Hash digest
SHA256 4daeb2a054cabd1413896c247d4048a0178ddca9a429e10797898bae1523e3b7
MD5 3e85805ed3b10a7a6ba9090d7ddba732
BLAKE2b-256 eb4af7515e944c1d18dc0c2d759199b882361b326d456be2db1b372d439f3226

See more details on using hashes here.

File details

Details for the file topsis_ishan_102313022-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for topsis_ishan_102313022-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fd245b10f6775626ea816cdaa798301e60082cfbf76e819834f87edc31ae5c06
MD5 22a84d2d93c942ded63287bb4f163063
BLAKE2b-256 24d0550418a7e00c21d6655d54e872dbed6089cd5ac13715572d706ee0440be7

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