A Python package implementing TOPSIS method for Multi-Criteria Decision Making (MCDM)
Project description
TOPSIS Python Package
A Python package that implements the Technique for Order of Preference by Similarity to Ideal Solution (TOPSIS) method. This package helps in solving Multi-Criteria Decision Making (MCDM) problems by ranking alternatives based on multiple criteria.
Installation
pip install topsis-Sarabjeet-102203770
Usage
The package can be used both as a command-line tool and as a Python module.
Command Line Usage
python -m topsis <InputDataFile> <Weights> <Impacts> <ResultFileName>
Example:
python -m topsis data.xlsx "1,1,1,1,1" "+,-,+,-,+" result.csv
Input File Format
- Excel file with .xlsx extension
- First column: Fund/Alternative names
- 2+ columns: Numerical values for criteria
- Example:
Fund Name | Return | Risk | Expense | ... Fund A | 10 | 20 | 30 | ... Fund B | 15 | 25 | 35 | ...
Parameters
- Weights: Comma-separated values of weights (e.g., "1,1,1,1,1")
- Impacts: Comma-separated +/- signs for maximizing/minimizing criteria (e.g., "+,-,+,-,+")
- ResultFileName: Output CSV file name
Output
The program will create a CSV file containing the input data along with:
- Topsis Score
- Rank
Sample Python Usage
from topsis import topsis
topsis("input.xlsx", [1,1,1,1,1], ['+','-','+','-','+'], "output.csv")
License
This project is licensed under the MIT License - see the LICENSE file for details.
Author
Sarabjeet Singh (ssingh20_be22@thapar.edu)
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_sarabjeet_102203770-1.1.0.tar.gz.
File metadata
- Download URL: topsis_sarabjeet_102203770-1.1.0.tar.gz
- Upload date:
- Size: 3.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c25f56df1f17267943b49981d8c1a1fefcae3e4b9adb351a986b43a205ef0cb3
|
|
| MD5 |
aed1e814838d305a3bf2675d6d358b87
|
|
| BLAKE2b-256 |
0c5e5a633af93d70894020123bcb6e02125a8e4b255f717b4cd4ee9d72ffd7c4
|
File details
Details for the file topsis_Sarabjeet_102203770-1.1.0-py3-none-any.whl.
File metadata
- Download URL: topsis_Sarabjeet_102203770-1.1.0-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.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
75cdf87bf2ddfbf3aefc055c87319d1945a9a487badcde9e3ca230fed8295f7b
|
|
| MD5 |
5b5af260c0b2c85ddcffd446799123cf
|
|
| BLAKE2b-256 |
bc79b1c993d63095f5da3ee206074641286d7660795574fa759a78f65b72aec8
|