A Python package for TOPSIS (Technique for Order of Preference by Similarity to Ideal Solution) analysis
Project description
Topsis-Saksham-102303157
A Python package implementing TOPSIS (Technique for Order of Preference by Similarity to Ideal Solution), a multi-criteria decision analysis method.
Description
TOPSIS is a method of compensatory aggregation that compares a set of alternatives by identifying weights for each criterion, normalizing scores for each criterion, and calculating the geometric distance between each alternative and the ideal alternative.
Installation
pip install Topsis-Saksham-102303157
Usage
Command Line
After installation, you can use the topsis command directly from the terminal:
topsis <InputDataFile> <Weights> <Impacts> <OutputResultFileName>
Example
topsis data.csv "1,1,1,2" "+,+,-,+" output.csv
Parameters
- InputDataFile: Path to the input CSV file
- Weights: Comma-separated weights for each criterion (e.g., "1,1,1,2")
- Impacts: Comma-separated impacts (+ or -) for each criterion (e.g., "+,+,-,+")
- OutputResultFileName: Path for the output CSV file
Input File Format
The input CSV file should have:
- First column: Names/identifiers of alternatives
- Remaining columns: Numeric values for each criterion
Example (data.csv):
Fund Name,P1,P2,P3,P4,P5
M1,0.67,0.45,6.5,42.6,12.56
M2,0.6,0.36,3.6,53.3,14.47
M3,0.82,0.67,3.8,63.1,17.1
Output
The program generates a CSV file with two additional columns:
- Topsis Score: The calculated TOPSIS score for each alternative
- Rank: Ranking based on TOPSIS score (1 = best)
Features
- Input validation (file existence, column count, numeric values)
- Proper error handling with descriptive messages
- Vector normalization method
- Weighted normalized decision matrix
- Euclidean distance calculation
- TOPSIS score and ranking
Requirements
- Python 3.6+
- pandas >= 1.0.0
- numpy >= 1.18.0
License
MIT License
Author
Saksham (Roll Number: 102303157)
Contributing
Contributions, issues, and feature requests are welcome!
Support
For support, email your.email@example.com
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_saksham_102303157-1.0.0.tar.gz.
File metadata
- Download URL: topsis_saksham_102303157-1.0.0.tar.gz
- Upload date:
- Size: 5.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c1095ab60433d2a8dd5f44d5e62250d3996ae4c0c34b94d030898bc8c8758bd5
|
|
| MD5 |
b287646c8b44fb4f9ceebf049ffbbb55
|
|
| BLAKE2b-256 |
1d1c24a04fa55a7c2bb695b3fae346e59e5ad9780b95e7eb7b0ca4a190ef4ea7
|
File details
Details for the file topsis_saksham_102303157-1.0.0-py3-none-any.whl.
File metadata
- Download URL: topsis_saksham_102303157-1.0.0-py3-none-any.whl
- Upload date:
- Size: 5.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
70f38131a4943804d71fcafdaedefb512b390eafec53ecc7a554332831be7cb8
|
|
| MD5 |
c3e922d7cf13b4ecb3a8ab6aef5f5673
|
|
| BLAKE2b-256 |
77572bd2b029e33c1aec6760616a39843c5b35883b1dc07d66f97840392e9eae
|