TOPSIS implementation using Python
Project description
TOPSIS Implementation in Python
Course: UCS654 - Predictive Analytics using Statistics
Assignment: Assignment-1 (TOPSIS)
Author: Ishika
Roll Number: 102303460
About the Project
This repository contains a Python implementation of the
TOPSIS (Technique for Order of Preference by Similarity to Ideal Solution) method.
TOPSIS is a multi-criteria decision-making (MCDM) technique used to rank multiple alternatives based on their distance from the ideal best and ideal worst solutions.
Installation - USER MANUAL
- topsis-ishika-102303460 requires Python3 to run.
- Other dependencies that come installed with this package are :-
- pandas
- numpy
- Package listed on PyPI:- https://pypi.org/project/Topsis-Ishika-102303460/1.0.0/
- Use the following command to install this package:-
pip install Topsis-Ishika-102303460==1.0.0
Usage
Run the following command in command prompt:
topsis <inputFile> <weights> <impacts> <outputFile>
Example:
topsis sample.csv "1,1,1,1" "+,+,-,+" result.csv
Help
To view usage instructions:
topsis /h
Example
Input File: sample.csv
The input file contains data for different mobile handsets with multiple criteria.
| Model | Storage (GB) | Camera (MP) | Price ($) | Looks (out of 5) |
|---|---|---|---|---|
| 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 |
Weights
[0.25, 0.25, 0.25, 0.25]
Impacts
[+, +, -, +]
Input Command
topsis sample.csv "0.25,0.25,0.25,0.25" "+,+,-,+"
Output
| Model | Topsis Score | Rank |
|---|---|---|
| M1 | 0.534277 | 3 |
| M2 | 0.308368 | 5 |
| M3 | 0.691632 | 1 |
| M4 | 0.534737 | 2 |
| M5 | 0.401046 | 4 |
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_ishika_102303460-0.0.1.tar.gz.
File metadata
- Download URL: topsis_ishika_102303460-0.0.1.tar.gz
- Upload date:
- Size: 3.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a6ef815aba0454715fb5315b59f324796a2cd8b09a715dcc904ea5ab2c393151
|
|
| MD5 |
01d8db223729c4b256332a8b42c7e1d8
|
|
| BLAKE2b-256 |
d7cbf6c63fd582f10eafe1c18ff2f7e65eba1dd5e585fce0872521a5e0818467
|
File details
Details for the file topsis_ishika_102303460-0.0.1-py3-none-any.whl.
File metadata
- Download URL: topsis_ishika_102303460-0.0.1-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.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d457299787019e622b8e8e8e9553f8850a6b0bae836de5430ff57e023761cab7
|
|
| MD5 |
6e3241d92d9e1862e8b9354e0c34ee50
|
|
| BLAKE2b-256 |
f4ed6366dcf5fedfbd41225bc651a7b9dd1b5e26c1c35682e28a4166017762d9
|