A Python package to perform TOPSIS.
Project description
TOPSIS: A Python Implementation
This project provides an implementation of the Technique for Order Preference by Similarity to Ideal Solution (TOPSIS), a widely-used decision-making method. The algorithm evaluates and ranks alternatives based on multiple attributes, considering the importance of each attribute (weights) and its impact type (benefit or cost).
Features
- Validation of Inputs: Ensures proper formatting of input data, weights, and impacts for consistent processing.
- Comprehensive Error Handling: Manages issues like missing files, invalid data, and incorrect input parameters.
- Output Results: Generates a CSV file that includes original data, calculated scores, and rankings.
How to Run
-
Clone the repository and navigate to the project directory.
-
Ensure Python and the required dependencies are installed.
-
Execute the program using the following command:
python -m topsis_shamma_102253003.topsis <InputDataSet.csv> <Weights> <Impacts> <Result.csv>
Example Usage
- Input File: A CSV file containing the dataset where each column represents an attribute, and each row represents an alternative.
- Weights: Specify the importance of each attribute as a list (e.g.,
[1, 2, 3, 4, 5]). - Impacts: Define whether each attribute is a benefit (
1) or a cost (0) (e.g.,[1, 0, 1, 1, 0]). - Output File: A CSV file with calculated TOPSIS scores and rankings.
Input Dataset Example
Example Weights
[1, 1, 1, 1, 1]
Example Impacts
[1, 0, 1, 0, 1]
1indicates a benefit0indicates a cost
Output
The resulting file includes:
- Original data
- Calculated TOPSIS scores
- Rankings based on the scores
Additional Resources
The package is available on PyPI. You can access it through the following link:
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_shamma_102253003-1.0.0.tar.gz.
File metadata
- Download URL: topsis_shamma_102253003-1.0.0.tar.gz
- Upload date:
- Size: 3.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
70f834f56432808d3259bab553bd23ab66fb3af15869e2241d21cdd453880541
|
|
| MD5 |
f552155ddd70d147d4fe3cd90c061a43
|
|
| BLAKE2b-256 |
dbae2b059b9066fe5459042021332b7ecfff825e5992a7c3bfafc1ba5f9d2484
|
File details
Details for the file topsis_Shamma_102253003-1.0.0-py3-none-any.whl.
File metadata
- Download URL: topsis_Shamma_102253003-1.0.0-py3-none-any.whl
- Upload date:
- Size: 4.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
473050c5a8b5491032379b999226c25499bbf5927dd4154efdd58455b31a6527
|
|
| MD5 |
87c572275e2310cbbf1a15b5a3d0b645
|
|
| BLAKE2b-256 |
dfd5e43b6ba73713153b34fcfed979559a8b310a64d9b9d33d718edf52c58b1d
|