TOPSIS implementation using Python
Project description
TOPSIS – Python Package
By: Pooja
Roll Number: 102303845
Course: UCS654 – Predictive Analytics using Statistics
Project Description
TOPSIS (Technique for Order of Preference by Similarity to Ideal Solution) is a multi-criteria decision-making (MCDM) method used to rank alternatives based on their distance from an ideal best solution and an ideal worst solution.
This Python package provides an easy-to-use command-line implementation of the TOPSIS algorithm. Users can input a dataset along with weights and impacts and obtain ranked results based on TOPSIS scores.
Installation
Install the package using pip:
pip install Topsis-Pooja-102303845
Usage
Run the following command:
topsis <inputFile> <weights> <impacts> <outputFile>
Example:
topsis sample.csv "1,1,1,1" "+,+,-,+" result.csv
Input File Format
- The input file must contain at least three columns
- The first column should contain alternative names
- All other columns must contain numeric values only
- The number of weights and impacts must match the number of criteria
Sample Input File
| 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 |
Output
The output file contains:
- Topsis Score
- Rank
The alternative with Rank 1 is considered the best choice.
Conclusion
This package simplifies the application of the TOPSIS method and enables efficient decision-making using multiple criteria through a simple command-line interface.
Project details
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_pooja_102303845-1.0.1.tar.gz.
File metadata
- Download URL: topsis_pooja_102303845-1.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.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2116cc7e676e672906f7c2a0f3cd2879fcbaae12b601251ce6311ddea8d1dc97
|
|
| MD5 |
80be0e6b3b4bfb6dadeb3aa24e0d2b27
|
|
| BLAKE2b-256 |
9b1db88570a890eb6a6c64a0732b1ea03ff0236e5b3305f7e8b60a83031b5d66
|
File details
Details for the file topsis_pooja_102303845-1.0.1-py3-none-any.whl.
File metadata
- Download URL: topsis_pooja_102303845-1.0.1-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.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2662967eb9eb86f34a0941c0cb6bd4861461ff732600e60823f427476b5aae00
|
|
| MD5 |
75ceb1eb4b697bdb524c8b6bd18fbe2b
|
|
| BLAKE2b-256 |
2012d991b195252fbc5bd103659d5023a8d56dc831830519f30566bab3fa8814
|