Skip to main content

A Python package implementing the TOPSIS method for multi-criteria decision making.

Project description

Project Description

topsis-gaurav-102303493

topsis-gaurav-102303493 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 package manager pip to install the package:

pip install topsis-gaurav-102303493

Usage

Enter the CSV filename followed by the weights vector (comma‑separated) and the impacts vector (comma‑separated + or -).

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 the TOPSIS score and rank for each alternative.


Important Notes

  • The first column of the CSV file must contain the alternative names (e.g., M1, M2, ...).
  • The 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 + (benefit) or - (cost).
  • Do not include categorical (non‑numeric) data in criteria columns.

Author

Developed by Gaurav Srivastava


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_gaurav_102303493-1.0.6.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_gaurav_102303493-1.0.6-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file topsis_gaurav_102303493-1.0.6.tar.gz.

File metadata

  • Download URL: topsis_gaurav_102303493-1.0.6.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.3

File hashes

Hashes for topsis_gaurav_102303493-1.0.6.tar.gz
Algorithm Hash digest
SHA256 6a376f46f96041b4220132116e43f23d13d3034d57fcbc393b728db419b9481f
MD5 ee7cc1683d16b168a612c2c7e7f62fa3
BLAKE2b-256 8e899fe73192a4ab090a809a89c19d2524ff5ab2d638150647f1666dd49a4c0c

See more details on using hashes here.

File details

Details for the file topsis_gaurav_102303493-1.0.6-py3-none-any.whl.

File metadata

File hashes

Hashes for topsis_gaurav_102303493-1.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 baa5ae8367c6cc2f898527aee9b1a5a672ec4429dcaa530ad842867e01adfb0a
MD5 0e65a44fc4e5928e6ccf389df168fb0e
BLAKE2b-256 80b401af4be16852a66f6af613558c1b324bdda3b2471ee7d8de0b13bbe07e48

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