TOPSIS implementation in Python
Project description
Topsis-Anjani-102303480
TOPSIS (Technique for Order of Preference by Similarity to Ideal Solution) implementation in Python for multi-criteria decision analysis.
Description
TOPSIS is a multi-criteria decision analysis method that ranks alternatives based on their similarity to the ideal solution. This package provides a simple command-line tool to perform TOPSIS analysis on CSV data files.
Installation
Install the package using pip:
pip install Topsis-Anjani-102303480
Usage
After installation, you can use the topsis command from anywhere in your terminal:
topsis <InputDataFile> <Weights> <Impacts> <OutputResultFileName>
Parameters
- InputDataFile: Path to the input CSV file
- Weights: Comma-separated weights for each criterion (e.g., "1,1,1,2")
- Impacts: Comma-separated impacts for each criterion ('+' for maximize, '-' for minimize)
- OutputResultFileName: Path for the output CSV file
Example
topsis data.csv "1,1,1,2" "+,+,-,+" result.csv
Input File Format
The input CSV file must follow this structure:
- First column: Names of alternatives/options
- Remaining columns: Numeric values for each criterion
- Minimum: 3 columns (1 name column + at least 2 criteria)
Example Input (data.csv)
Model,Price,Storage,Camera,Battery
P1,250,64,12,4000
P2,200,32,8,3500
P3,300,128,16,4500
P4,275,64,12,4200
P5,225,32,16,3800
Output Format
The output CSV includes all original columns plus:
- Topsis Score: Score between 0 and 1 (higher is better)
- Rank: Ranking based on TOPSIS score (1 is best)
Example Output (result.csv)
Model,Price,Storage,Camera,Battery,Topsis Score,Rank
P3,300,128,16,4500,0.691,1
P4,275,64,12,4200,0.535,2
P1,250,64,12,4000,0.534,3
P5,225,32,16,3800,0.401,4
P2,200,32,8,3500,0.308,5
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_anjani_102303480-1.0.0.tar.gz.
File metadata
- Download URL: topsis_anjani_102303480-1.0.0.tar.gz
- Upload date:
- Size: 3.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
650cd3c9f38597f9b9d70cc157154b1cb27207509371021c7c827b539eee8ca7
|
|
| MD5 |
489c47cb7599d1d8f11a3659b5a0d29f
|
|
| BLAKE2b-256 |
872ff5195beb7529f834986aef50ddac2cece7435e4af47043df78e80e6eb2c9
|
File details
Details for the file topsis_anjani_102303480-1.0.0-py3-none-any.whl.
File metadata
- Download URL: topsis_anjani_102303480-1.0.0-py3-none-any.whl
- Upload date:
- Size: 3.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dc406178ba7442f4e2b08c6d78044044c8ca811761cd270cf92d6222c176a53b
|
|
| MD5 |
9a258084160b65c387b9a836cb92cee9
|
|
| BLAKE2b-256 |
44cfab3096aa7c0a141a049b87d92fca6baada385634caa7f6a8a49fc46edebd
|