TOPSIS implementation for MCDM problems
Project description
TOPSIS Python Package
Project-1 (UCS654)
Submitted by: Vansh Garg Roll No: 102303137 Group: 3C15
Project Description:
topsis-vansh-102303137 is a Python package for solving Multiple Criteria Decision Making (MCDM) problems using the Technique for Order Preference by Similarity to Ideal Solution (TOPSIS) method.
This package helps in ranking alternatives based on their distance from the ideal best and ideal worst solutions.
Installation
Install the package using pip: pip install topsis-vansh-102303137
Usage
Run the package directly from the command line: topsis <input_file.csv>
Example: topsis sample.csv "0.25,0.25,0.25,0.25" "+,+,-,+"
Weights and impacts can also be passed without quotes: topsis sample.csv 0.25,0.25,0.25,0.25 +,+,-,+
⚠️ Important: If your input contains spaces, always enclose it in double quotes " ".
Input File Format:
- Input file must be a CSV file
- First column → Alternative name (identifier)
- Remaining columns → Numeric criteria only
- No missing or categorical values allowed
Sample CSV (sample.csv): Model,Storage,Camera,Price,Looks M1,16,12,250,5 M2,16,8,200,3 M3,32,16,300,4 M4,32,8,275,4 M5,16,16,225,2
Parameters Weights Vector Must be numeric Length = number of criteria
Example: 0.25,0.25,0.25,0.25
Impacts Vector Use + for benefit criteria Use - for cost criteria
Example: +,+,-,+
Output The program generates a CSV file with: Topsis Score → Relative closeness to ideal solution Rank → Higher score gets better rank
Sample Output: Topsis Score Rank 1 0.534277 3 2 0.308368 5 3 0.691632 1 4 0.534737 2 5 0.401046 4
Notes Higher Topsis Score indicates a better alternative Rank 1 represents the best option Input validation is performed for:
Missing values Incorrect weights/impacts length Invalid impact symbols
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 Distributions
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_vansh_102303137-1.0.0-py3-none-any.whl.
File metadata
- Download URL: topsis_vansh_102303137-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.11.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fc2747eb8b09cbdbed19aa93dec7eb00620f8683affc2e04ef47a1342ebbc9d4
|
|
| MD5 |
85d6a65d1fa349cef2d1e6e9241bdd05
|
|
| BLAKE2b-256 |
ebe595557d84142c12adb40e29cf7c18f4e5c231f2006620b63152ee2381e4e9
|