This Package will help you to calculate TOPSIS Score for multiple criteria...
Project description
TOPSIS Implementation in Python...
Overview
This Python script implements the TOPSIS (Technique for Order of Preference by Similarity to Ideal Solution) method for multi-criteria decision-making. It calculates the performance score and rank for given data based on user-defined weights and impacts.
Usage
Run the script with the following command:
python topsis.py <inputFileName> <weights> <impacts> <resultFileName>
<inputFileName>: Path to the CSV file containing the dataset.<weights>: Comma-separated weights for the criteria (e.g.,1,2,3).<impacts>: Comma-separated impacts for the criteria (+for benefit,-for cost).<resultFileName>: Name of the output file where results will be saved.
Input File Requirements
- Must be a
.csvfile with at least 3 columns. - The first column can contain non-numeric values (e.g., IDs).
- Columns from the 2nd to the last must contain numeric values only.
Features
- Validation:
- Ensures correct number of inputs.
- Validates weights, impacts, and column counts.
- Handles missing or invalid files.
- Error Handling:
- Displays user-friendly messages for issues like file not found, non-numeric data, or mismatched input parameters.
- Output:
- Adds two new columns:
Topsis ScoreandRank. - Saves the results in the specified output file.
- Adds two new columns:
Dependencies
- Python 3.x
- Required libraries:
pandas,math,sys
Install dependencies using:
pip install pandas
License
This project is open-source and free to use under the MIT License.
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 abhishek_topsis-0.0.1.tar.gz.
File metadata
- Download URL: abhishek_topsis-0.0.1.tar.gz
- Upload date:
- Size: 3.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c639c6b419c970b1d4e3613b880d3dc6a09dc346fa674be16399ef0b777228dd
|
|
| MD5 |
f9009c95a4bba8ec8eeb966ba806e84a
|
|
| BLAKE2b-256 |
0eb6878577af5d935cd757910b5a6a5412ba340171f69f73dec6a77d9bb1878b
|
File details
Details for the file abhishek_topsis-0.0.1-py3-none-any.whl.
File metadata
- Download URL: abhishek_topsis-0.0.1-py3-none-any.whl
- Upload date:
- Size: 4.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ff7744382e2248e5cd4135fb61ab5bab124693da56014b0111b85450ece4dbb6
|
|
| MD5 |
2059bd77bbe43314b9b06daf5c86247f
|
|
| BLAKE2b-256 |
0b91fb7998c5a5802739407c19093750b457a6da5df6668f6e940aef198fad7a
|