TOPSIS implementation for multi-criteria decision making
Project description
Project Description
Submitted by: Saanvi Wadhwa Roll No: 102483080 Group: 3C15
Overview
topsis-saanvi-102483080 is a Python package designed to solve multi-criteria decision-making (MCDM) problems using the TOPSIS (Technique for Order Preference by Similarity to Ideal Solution) method. The package allows users to evaluate multiple alternatives based on several criteria and ranks them according to their relative closeness to the ideal solution.
Key Features
Command-line based execution Supports any number of criteria and alternatives Accepts weights and impacts as comma-separated inputs Handles both benefit (+) and cost (-) criteria Produces a ranked output in CSV format
Installation
The package can be installed using pip. From TestPyPI: pip install -i https://test.pypi.org/simple/ topsis-saanvi-102483080 --extra-index-url https://pypi.org/simple
How to Use
Provide the input CSV file followed by the weights and impacts. Syntax: topsis <input.csv> <output.csv>
Example: topsis sample.csv "0.25,0.25,0.25,0.25" "+,+,-,+" result.csv
Note: If weights or impacts contain spaces, enclose them within double quotes.
Sample Input
Example Dataset data.csv
The following dataset represents different investment funds evaluated across multiple parameters.
| Fund Name | P1 | P2 | P3 | P4 | P5 |
|---|---|---|---|---|---|
| M1 | 0.84 | 0.71 | 6.7 | 42.1 | 12.59 |
| M2 | 0.91 | 0.83 | 7.0 | 31.7 | 10.11 |
| M3 | 0.79 | 0.62 | 4.8 | 46.7 | 13.23 |
| M4 | 0.78 | 0.61 | 6.4 | 42.4 | 12.55 |
| M5 | 0.94 | 0.88 | 3.6 | 62.2 | 16.91 |
| M6 | 0.88 | 0.77 | 6.5 | 51.5 | 14.91 |
| M7 | 0.66 | 0.44 | 5.3 | 48.9 | 13.83 |
| M8 | 0.93 | 0.86 | 3.4 | 37.0 | 10.55 |
Output
The output file includes: TOPSIS Score – numerical measure of preference Rank – relative ranking of alternatives Higher score indicates a better alternative.
| Fund Name | Topsis Score | Rank |
|---|---|---|
| M6 | 0.653276 | 1 |
| M2 | 0.605985 | 2 |
| M1 | 0.603261 | 3 |
| M5 | 0.546243 | 4 |
| M4 | 0.532353 | 5 |
| M8 | 0.494089 | 6 |
| M3 | 0.453053 | 7 |
| M7 | 0.393907 | 8 |
Assumptions
The first column contains alternative names. Remaining columns must be numeric. Number of weights must match number of criteria. Impacts can only be + or -.
License
This project is released under the MIT License and is intended for academic use.
Author
Saanvi Wadhwa
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_saanvi_102483080-2.0.0.tar.gz.
File metadata
- Download URL: topsis_saanvi_102483080-2.0.0.tar.gz
- Upload date:
- Size: 3.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6252c03290ffbbda0e05b594479b0f62d5e250e8b313fdc7e8f44728821f6849
|
|
| MD5 |
d6436ce7fe5cd0b208987ffefa1cd490
|
|
| BLAKE2b-256 |
df3679aab4c9df53633f4462a83c9ac21e75df7bb8972cc6203fcba8b307ef5d
|
File details
Details for the file topsis_saanvi_102483080-2.0.0-py3-none-any.whl.
File metadata
- Download URL: topsis_saanvi_102483080-2.0.0-py3-none-any.whl
- Upload date:
- Size: 3.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
457259c86e36ace6f45064e56415cac4b6fab91f946068f29cd996232faa7f78
|
|
| MD5 |
bc1aa11ef3c96212877fa4acf922232b
|
|
| BLAKE2b-256 |
9d7f2adc9f30b51521cb520abacedfc654f84c113ea471f548d685a3225abf56
|