A Python package implementing TOPSIS for multi-criteria decision making
Project description
Topsis-Trishti-102313056
For: Project-1 (UCS654) Submitted by: Trishti Roll No: 102313056 Group: 3C33
Topsis-Trishti-10155792 is a Python library designed to solve Multiple Criteria Decision Making (MCDM) problems using the Technique for Order of Preference by Similarity to Ideal Solution (TOPSIS) method.
The package helps users rank alternatives based on multiple quantitative criteria by calculating their closeness to the ideal best and ideal worst solutions. It is implemented as a command-line tool, making it easy to use for academic and real-world decision-making problems.
Installation
The package can be installed using the Python package manager pip.
pip install Topsis-Trishti-10155792
Usage
Provide the input CSV file name, followed by the weights vector and the impacts vector.
topsis input.csv "1,1,1,1" "+,+,-,+"
Alternatively, vectors can be passed without quotes:
topsis input.csv 1,1,1,1 +,+,-,+
Note:
If the vectors contain spaces, they must be enclosed within double quotes " ".
To view help instructions, use:
topsis /h
Example
Input File: sample.csv
A CSV file containing data for different mobile handsets with multiple attributes.
| Model | Storage (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:
[+, +, -, +]
Command
topsis sample.csv "0.25,0.25,0.25,0.25" "+,+,-,+"
Output
TOPSIS RESULTS
-----------------------------
Topsis Score Rank
1 0.534277 3
2 0.308368 5
3 0.691632 1
4 0.534737 2
5 0.401046 4
The output file contains the TOPSIS score and rank for each alternative.
Important Notes
- The first column (identifiers) and the header row are ignored during computation.
- The CSV file must contain only numerical values (no categorical data).
- The number of weights and impacts must match the number of criteria.
- Impacts must be either
+(benefit) or-(cost).
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file topsis_trishti_102313056-0.1.0.tar.gz.
File metadata
- Download URL: topsis_trishti_102313056-0.1.0.tar.gz
- Upload date:
- Size: 3.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8d64724b6a5539d65880c9d4f768b56cb26d7e5c2b084868c0617c12974e7bb4
|
|
| MD5 |
2eba062148111361abcca2b754a625a2
|
|
| BLAKE2b-256 |
c6c1d2bb1b445c7e46bf363104a1c9ef453efbab7ae7c8fffc0db37a4a2f14cc
|
File details
Details for the file topsis_trishti_102313056-0.1.0-py3-none-any.whl.
File metadata
- Download URL: topsis_trishti_102313056-0.1.0-py3-none-any.whl
- Upload date:
- Size: 3.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3f16c3cf8bc21b31bba60f8c26c1e2131b52c0054982477f06807d52c6a464db
|
|
| MD5 |
907abb55128efeebe8644f6cea6d3030
|
|
| BLAKE2b-256 |
225955509afd7c9d6d27a69e1104dd2732fd897515691fd636a01bfaf9487dd3
|