TOPSIS implementation using Python
Project description
Topsis-Sneha-102303723
This Python package implements the TOPSIS (Technique for Order Preference by Similarity to Ideal Solution) method, a multi-criteria decision-making technique used to rank alternatives based on their distance from an ideal best and ideal worst solution.
Installation
Install the package from PyPI using pip:
pip install Topsis-Sneha-102303723
Usage
The package provides a command-line interface (CLI).
Command format
topsis <input_file> <output_file>
Example
topsis data.csv "2,1,3,1,2" "+,-,+,+,-" result.csv
Input File Format
- The input file must be a CSV file.
- The file must contain at least 3 columns.
- The first column is treated as an identifier (name/label).
- All columns from the second column to the last column must contain numeric values only.
Weights and Impacts
- Weights must be numeric and separated by commas.
- Impacts must be either + (benefit) or - (cost) and separated by commas.
- The number of weights and impacts must be equal to the number of criteria columns.
Output
- The output is a CSV file.
- Two additional columns are added:
- Topsis Score
- Rank
- Higher Topsis score indicates a better rank.
Error Handling
The program validates:
- Correct number of command-line arguments
- File existence
- Numeric values in criteria columns
- Correct number of weights and impacts
- Valid impact symbols (+ or -)
Author
Sneha
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_sneha_102303723-1.0.0.tar.gz.
File metadata
- Download URL: topsis_sneha_102303723-1.0.0.tar.gz
- Upload date:
- Size: 3.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b2ebbc60c3c79d0c37e14c60ac76ca3e50d853b7d2e162c21a326281572e2995
|
|
| MD5 |
19c28871ba1046a4c6fd55d6c6ececed
|
|
| BLAKE2b-256 |
d4f4823b8ea6b4ee02daeb62e96cf4b870bdbf39730efe1a2305c96475e1300d
|
File details
Details for the file topsis_sneha_102303723-1.0.0-py3-none-any.whl.
File metadata
- Download URL: topsis_sneha_102303723-1.0.0-py3-none-any.whl
- Upload date:
- Size: 3.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dc307161b5308cdf14ec0f9b1bd6e484efb775054949a1087ed6bd9484707dd3
|
|
| MD5 |
319200cd6650bcedec9b044bd8e5eb53
|
|
| BLAKE2b-256 |
8eab6e0ef9ce4f0b1f421a92e4d0053abffa35f7a1342c314c75d103a301efac
|