A Python package for TOPSIS calculation
Project description
TOPSIS Package
A Python package for decision-making using the TOPSIS method.
What is TOPSIS?
The Technique for Order Preference by Similarity to Ideal Solution (TOPSIS) is a multi-criteria decision analysis method.
It ranks alternatives based on their closeness to the ideal solution and farthest from the worst solution, making it an excellent tool for decision-making problems.
Features
- Simple and efficient implementation of the TOPSIS algorithm.
- Accepts a decision matrix via a CSV file.
- Supports customizable weights and impacts for criteria.
- Outputs the TOPSIS scores and ranks into an easy-to-read CSV file.
Installation
You can install the package from PyPI using:
pip install 102217186-abhaijeet-topsis==1.0.0
How to Use
Run the Package
You can run the TOPSIS package directly from the command line using:
python -m 102217186_abhaijeet_topsis <input_file> <weights> <impacts> <output_file>
Parameters
<input_file>: Path to the CSV file containing the decision matrix.<weights>: Comma-separated weights for each criterion (e.g.,0.2,0.1,0.43,0.3).<impacts>: Comma-separated impacts for each criterion (e.g.,+,+,-,-, where+indicates a benefit criterion and-indicates a cost criterion).<output_file>: Path to the output CSV file where the results will be saved.
Example Usage
Input CSV (input.csv)
Command
python -m 102217186_abhaijeet_topsis input.csv "0.2,0.1,0.4,0.3" "+,+,-,+"
output.csv
Output CSV (output.csv)
How It Works
- Normalization: The decision matrix is normalized to bring all criteria onto a comparable scale.
- Weighting: Each criterion is multiplied by its corresponding weight.
- Ideal Solutions: Calculates the ideal best and worst solutions based on the impacts.
- Distance Calculation: Computes the distance of each alternative from the ideal best and worst solutions.
- Ranking: Scores and ranks alternatives based on their relative closeness to the ideal solution.
License
This project is licensed under the MIT License. See the LICENSE file for details.
Support
If you encounter any issues or have questions, feel free to open an issue on GitHub.
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 102217186_abhaijeet_topsis-1.1.0.tar.gz.
File metadata
- Download URL: 102217186_abhaijeet_topsis-1.1.0.tar.gz
- Upload date:
- Size: 4.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e7695e58255bb14ed60edc80b40fdfd5a5975c6e45c74a3e8ef6f314596a1f46
|
|
| MD5 |
8b587e4109279c30540836a5f9219e26
|
|
| BLAKE2b-256 |
865e87934cdf064640b534a8f8a2af8bfd00b3aa716c5d2209c10ed1735df69e
|
File details
Details for the file 102217186_abhaijeet_topsis-1.1.0-py3-none-any.whl.
File metadata
- Download URL: 102217186_abhaijeet_topsis-1.1.0-py3-none-any.whl
- Upload date:
- Size: 5.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1c394a1266ba7493ed5400e64c756c4058735af278637c11d4e7709757b5a1c8
|
|
| MD5 |
c648fc08a0bc8bdc8f572fa722d122e8
|
|
| BLAKE2b-256 |
440a44e181f49a3f0c7c7edf1273f215c3fba6b52ba729538e54a5172df3cf1f
|