A Python package for TOPSIS (Technique for Order Preference by Similarity to Ideal Solution) - Multi-Criteria Decision Making
Project description
๐ฏ TOPSIS
Technique for Order Preference by Similarity to Ideal Solution
A powerful multi-criteria decision-making (MCDM) technique used to rank alternatives based on their distance from an ideal best and an ideal worst solution.
๐ฆ Installation โข ๐ Quick Start โข ๐ Documentation โข ๐ค Author
๐ก About
This Python package provides a clean, efficient, and command-line friendly implementation of TOPSIS, designed as part of an academic assignment and packaged professionally for real-world usage via PyPI.
โจ Key Features
| Feature | Description |
|---|---|
| โ Standard Compliant | Fully compliant with standard TOPSIS methodology |
| ๐ฅ๏ธ CLI Support | Easy-to-use command-line interface |
| ๐ก๏ธ Robust Validation | Comprehensive input validation and error handling |
| โ๏ธ Customizable | Supports customizable weights and impacts |
| ๐ Ranked Output | Outputs ranked results with TOPSIS score |
| ๐ชถ Lightweight | Minimal dependencies, easy installation via pip |
๐ฆ Installation
Install directly from PyPI using pip:
pip install Topsis-Rehnoor-102317137
๐ฅ๏ธ Usage
Run the package from the command line:
python -m topsis <input_file.csv> "<weights>" "<impacts>" <output_file.csv>
๐น Example
python -m topsis data.csv "1,1,1,2" "+,+,-,+" result.csv
๐ Input File Format
โ ๏ธ Requirements:
- โ๏ธ Input file must be a CSV file
- โ๏ธ Must contain at least 3 criteria columns
- โ๏ธ First column โ Alternative names (non-numeric)
- โ๏ธ Remaining columns โ Numeric criteria values only
๐ Sample Input (data.csv)
| Model | Cost | Performance | Maintenance | Mileage |
|---|---|---|---|---|
| M1 | 250 | 7.5 | 5 | 18 |
| M2 | 300 | 8.0 | 6 | 20 |
| M3 | 200 | 6.5 | 4 | 15 |
๐ค Output File
The output CSV file contains:
- ๐ All original columns
- ๐ Topsis Score
- ๐ Rank (Rank 1 = Best Alternative)
๐ Sample Output
| Model | Cost | Performance | Maintenance | Mileage | Topsis Score | Rank |
|---|---|---|---|---|---|---|
| M2 | 300 | 8.0 | 6 | 20 | 0.72 | ๐ฅ 1 |
| M1 | 250 | 7.5 | 5 | 18 | 0.58 | ๐ฅ 2 |
| M3 | 200 | 6.5 | 4 | 15 | 0.31 | ๐ฅ 3 |
๐ฌ Behind the Scenes (TOPSIS Steps)
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ TOPSIS Algorithm โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ 1๏ธโฃ Normalize the decision matrix โ
โ 2๏ธโฃ Apply user-defined weights โ
โ 3๏ธโฃ Determine ideal best and worst solutions โ
โ 4๏ธโฃ Calculate Euclidean distances (Sโบ and Sโป) โ
โ 5๏ธโฃ Compute TOPSIS performance score โ
โ 6๏ธโฃ Rank alternatives based on scores โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
๐ ๏ธ Technologies Used
๐ค Author
๐ License
โญ If you found this helpful, please consider giving it a star! โญ
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_rehnoor_102317137-1.0.0.tar.gz.
File metadata
- Download URL: topsis_rehnoor_102317137-1.0.0.tar.gz
- Upload date:
- Size: 5.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
30332d1be05f07b03b2eb11e7b3cc5b0bf339e74edf13c7e4da5c9a93573eaf4
|
|
| MD5 |
7d57e085da29aaccfe0979397fd272de
|
|
| BLAKE2b-256 |
d537474e27e575577387157e6fe26ea88fe79681ee975a9d7459d0b3616ac3c3
|
File details
Details for the file topsis_rehnoor_102317137-1.0.0-py3-none-any.whl.
File metadata
- Download URL: topsis_rehnoor_102317137-1.0.0-py3-none-any.whl
- Upload date:
- Size: 6.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0158169c2bb51ad32a65c04028cd962ec3b8f7f4d0c1ebc113ff595022eb1793
|
|
| MD5 |
59438457ab606fd31e4ef7dea7891406
|
|
| BLAKE2b-256 |
0e909a5c98d749c4e6b2666b2fb253cba260939bf380360948f09302a9c64900
|