A Python package for implementing TOPSIS
Project description
Topsis-Harsh-102203964
A Python package for implementing the Technique for Order of Preference by Similarity to Ideal Solution (TOPSIS) method. This method is used for multi-criteria decision-making.
Installation
Install the package using pip:
pip install Topsis-Harsh-102203964
Usage
Command-Line Interface
After installation, you can use the topsis command to calculate rankings for your dataset.
Command Syntax
topsis <InputDataFile> <Weights> <Impacts> <ResultFileName>
<InputDataFile>: Path to the input CSV file.<Weights>: Comma-separated list of weights for each criterion (e.g.,2,1,3,2,1).<Impacts>: Comma-separated list of impacts for each criterion (+for positive,-for negative).<ResultFileName>: Path to save the output CSV file.
Input File Format
- The input file must be a CSV with at least 3 columns.
- The first column should contain the names of the objects (e.g., M1, M2, ...).
- The remaining columns should contain numeric criteria values.
Example Input (data.csv):
Object,Criteria1,Criteria2,Criteria3,Criteria4
M1,250,16,12,5
M2,200,16,8,3
M3,300,32,16,4
M4,275,16,8,4
M5,225,32,16,2
Example Usage
- Prepare the input CSV file (e.g.,
data.csv). - Run the following command:
topsis data.csv 2,1,3,2,1 +,-,+,+,+ result.csv
- The result will be saved in the specified output file (e.g.,
result.csv).
Example Output (result.csv):
Object,Criteria1,Criteria2,Criteria3,Criteria4,Topsis Score,Rank
M1,250,16,12,5,0.75,2
M2,200,16,8,3,0.45,4
M3,300,32,16,4,0.85,1
M4,275,16,8,4,0.55,3
M5,225,32,16,2,0.30,5
Requirements
This package requires the following Python libraries:
numpypandas
These dependencies are automatically installed with the package.
License
This project is licensed under the MIT License. See the LICENSE file for details.
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_harsh_102203964-1.0.0.tar.gz.
File metadata
- Download URL: topsis_harsh_102203964-1.0.0.tar.gz
- Upload date:
- Size: 4.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
312ca786c0a93d09087c4fd956e518bb75c906886a7aec28df340168f066f34a
|
|
| MD5 |
3b2f073ee72ec66a9d3a262e0e8dae03
|
|
| BLAKE2b-256 |
cdadc55163ab480e36bc5af594241bf4ce6bac78e48c262f31556a045747a75c
|
File details
Details for the file Topsis_Harsh_102203964-1.0.0-py3-none-any.whl.
File metadata
- Download URL: Topsis_Harsh_102203964-1.0.0-py3-none-any.whl
- Upload date:
- Size: 6.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
de557f54d1eab0b7ac85aa766428d36c7b9376540e6116f869516901dc2947a1
|
|
| MD5 |
4e6899e85ea078d140324dd2deb32e5c
|
|
| BLAKE2b-256 |
7cf91e8dfec780ddba2c9b4db5a18838b6317d324fec24a39973cbd07cfdf73d
|