A Python package that implements the TOPSIS method for multi-criteria decision-making (MCDM).
Project description
Topsis-Kashika-102203492 Topsis-Kashika-102203492 is a Python package that implements the TOPSIS (Technique for Order of Preference by Similarity to Ideal Solution) method for multi-criteria decision-making (MCDM). The TOPSIS method is used to rank and evaluate alternatives based on multiple criteria, helping decision-makers identify the best alternative.
Features TOPSIS Algorithm: Implements the TOPSIS (Technique for Order of Preference by Similarity to Ideal Solution) method. Customizable Weights and Impacts: Allows users to define the weights (importance) and impacts (positive or negative) of criteria. CSV Input and Output: Takes an input CSV file with alternatives and their criteria, processes it, and generates an output CSV with the TOPSIS score and rank for each alternative. Command-Line Interface: Easily run the package via the command line. Installation You can install the package directly from PyPi using the following command:
bash Copy pip install Topsis-Kashika-102203492 This will install the package and its dependencies.
Usage After installing the package, you can use it via the command line.
Command Syntax: bash Copy python -m 102203492.102203492 Where:
: The path to the input CSV file (e.g., 3492-data.csv). : A comma-separated string representing the weights for each criterion (e.g., "1,1,1,2,3"). : A comma-separated string of impacts (+ for positive impact, - for negative impact) (e.g., "+,+,-,+,+"). : The path to the output CSV file where the results will be saved (e.g., 3492_result.csv). Example: bash Copy python -m 102203492.102203492 3492-data.csv "1,1,1,2,3" "+,+,-,+,+" 3492_result.csv This command will:
Read the data from 3492-data.csv. Apply the TOPSIS method with the weights 1,1,1,2,3 and impacts +,+,-,+,+. Save the resulting scores and ranks to 3492_result.csv. Example Input (3492-data.csv): The input CSV file should have the following format, where the first column contains the alternative names and the subsequent columns represent numeric values for each criterion.
Alternative Criterion 1 Criterion 2 Criterion 3 Criterion 4 Criterion 5 A1 3.5 5.0 4.0 2.0 4.5 A2 4.0 4.0 3.5 3.0 4.0 A3 2.0 3.0 5.0 4.0 5.0 Example Output (3492_result.csv): The output CSV file will include the original data along with two additional columns:
Topsis Score: The calculated score for each alternative. Rank: The rank of each alternative based on the Topsis score. Alternative Criterion 1 Criterion 2 Criterion 3 Criterion 4 Criterion 5 Topsis Score Rank A1 3.5 5.0 4.0 2.0 4.5 0.85 1 A2 4.0 4.0 3.5 3.0 4.0 0.78 2 A3 2.0 3.0 5.0 4.0 5.0 0.65 3 Dependencies This package requires the following Python libraries:
pandas: For data handling and CSV file manipulation. numpy: For numerical calculations. You can install these dependencies using:
bash Copy pip install pandas numpy License This project is licensed under the MIT License. See the LICENSE file for more details.
Author Kashika Roll Number: 102203492
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_kashika_102203492-0.2.tar.gz.
File metadata
- Download URL: topsis_kashika_102203492-0.2.tar.gz
- Upload date:
- Size: 3.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
26104f3b8f684f53ec39302da65df4b8be9a66f87434a0b2806e67b369a5df55
|
|
| MD5 |
86e8196904800cc2e677b8a286e80cc5
|
|
| BLAKE2b-256 |
77cbc9b9a967a2a8c1cc49b9a94342f0b10fb44a4bf661a4d97dd9323e91e9b5
|
File details
Details for the file Topsis_Kashika_102203492-0.2-py3-none-any.whl.
File metadata
- Download URL: Topsis_Kashika_102203492-0.2-py3-none-any.whl
- Upload date:
- Size: 3.3 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 |
71142ae85b562d0b2f8cd4376960cff9e05eb77664ec01869e69e83c02b562ea
|
|
| MD5 |
28987964a59885bb15ce486cec514daa
|
|
| BLAKE2b-256 |
cea6092841b7ec753a08c2816f51c35a54fe5c1f38c8e35c9fcf138164b44271
|