A command-line implementation of the TOPSIS method.
Project description
Topsis-Karan-102317145
This is a simple command-line implementation of the TOPSIS method in Python.
TOPSIS stands for Technique for Order Preference by Similarity to Ideal Solution.
It is a multi-criteria decision-making method used to rank alternatives based on multiple criteria.
This package allows you to:
- Provide a CSV file
- Provide weights for each criterion
- Provide impact (+ or -) for each criterion
- Automatically calculate TOPSIS score
- Get ranking as output in a CSV file
What This Tool Does
- Cleans the dataset
- Handles numeric and ordinal data
- Drops invalid or text-only columns
- Normalizes the data
- Applies weights
- Calculates ideal best and worst
- Computes TOPSIS score
- Ranks alternatives
- Saves result in output CSV
Installation
You can install the package using pip:
pip install Topsis-Karan-102317145
Make sure you are using Python 3.8 or above.
Input File Format
Your CSV file must:
- Have at least 3 columns
- First column = Name / Identifier
- Remaining columns = Criteria
- Criteria must be numeric or ordinal
Example:
How To Use (Command Line)
After installation, run: topsis data.csv "1,1,1" "-,+,+” output.csv
Explanation:
data.csv→ Input file"1,1,1"→ Weights for each criterion"- , + , +"→ Impact for each criterion+means benefit (higher is better)-means cost (lower is better)
output.csv→ Output file name
Output
The output file will look like:
Higher score means better rank.
Important Notes
- Number of weights must match number of criteria.
- Number of impacts must match number of criteria.
- Impacts must be only
+or-. - Missing values are automatically handled.
- Text-only columns are ignored.
Author
Karan
Roll No: 102317145
About TOPSIS
TOPSIS works by:
- Normalizing the data
- Applying weights
- Finding ideal best and worst values
- Measuring distance from ideal solution
- Ranking based on closeness
It is commonly used in decision-making problems like:
- Product comparison
- Supplier selection
- Performance evaluation
- Ranking alternatives
Thank you for using this package!!
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_karan_102317145-1.0.0.tar.gz.
File metadata
- Download URL: topsis_karan_102317145-1.0.0.tar.gz
- Upload date:
- Size: 4.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8cd7595e11cd6e7a82680b41fbdabda8ad1405dd51267917c258886d110d17ca
|
|
| MD5 |
9f7d11448a99079b50e227818eed01c2
|
|
| BLAKE2b-256 |
a0763179ff00a805aa13c3030e041108c5c3b21aa6b06a9013a34e3dae3fe938
|
File details
Details for the file topsis_karan_102317145-1.0.0-py3-none-any.whl.
File metadata
- Download URL: topsis_karan_102317145-1.0.0-py3-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
231f6336a5ab0b4568eb76619714322e35823c416b1b9ad95c31340d3aa018ac
|
|
| MD5 |
93fabc3ebc6e0bedca997a8ccfa47914
|
|
| BLAKE2b-256 |
6c5fe372ba95ee53f37dbf09794ee57bbbd5138a100b1adbfae56e0da55f566c
|