Multiple Criteria Decision Making using Topsis
Project description
TOPSIS Python Package
Overview
TOPSIS (Technique for Order of Preference by Similarity to Ideal Solution) is a popular multi-criteria decision analysis (MCDA) method. It ranks and selects options based on multiple criteria, considering varying weights and impacts. This package implements the TOPSIS method to rank alternatives using input data, weights, and impacts. It generates results with rankings, distances to ideal best/worst solutions, and TOPSIS scores.
Features
- Flexible Ranking: Ranks options based on customizable criteria.
- Weight and Impact Support: Handles criteria with different importance (weights) and impacts (positive/negative).
- Distance Calculations: Computes distances to ideal best and worst solutions.
- CSV Input/Output: Accepts input data in CSV format and outputs results in CSV format.
Installation
Install the package using pip:
pip install Topsis-Miet-102203012
Usage
Command-Line Interface
Run the TOPSIS method from the command line using the following syntax:
python -m topsis.topsis <input_data.csv> <weights> <impacts> <result.csv>
Parameters
-
<input_data.csv>(Required):- Path to the input CSV file containing options and criteria values.
- The first column should represent the options (e.g., Option1, Option2).
- The remaining columns should contain numerical values for the criteria.
-
<weights>(Required):- A comma-separated string representing the weights for each criterion.
- Higher values indicate greater importance.
-
<impacts>(Required):- A comma-separated string representing the impacts for each criterion.
- Use
+for positive impacts (higher values are better) and-for negative impacts (lower values are better).
-
<result.csv>(Required):- Path to the output CSV file where the results will be saved.
- The output includes:
- Option: Option names.
- Distance from Ideal Best: Euclidean distance to the ideal best solution.
- Distance from Ideal Worst: Euclidean distance to the ideal worst solution.
- TOPSIS Score: Indicates closeness to the ideal solution.
- Rank: Ranking of each option based on the TOPSIS score.
Example
Input CSV: input_data.csv
Option,Criterion1,Criterion2,Criterion3,Criterion4,Criterion5
Option1,7,9,6,8,7
Option2,8,7,9,7,8
Option3,6,5,8,6,5
Command
python -m topsis.topsis input_data.csv "1,1,2,2,1" "+,+,-,-,-" result.csv
Output CSV: result.csv
Option,Distance from Ideal Best,Distance from Ideal Worst,TOPSIS Score,Rank
Option1,2.5,5.0,0.6667,1
Option2,3.0,4.5,0.6,2
Option3,3.5,3.0,0.4615,3
Understanding the Output
- Distance from Ideal Best: Measures how far each option is from the best possible solution.
- Distance from Ideal Worst: Measures how far each option is from the worst possible solution.
- TOPSIS Score: A normalized score indicating closeness to the ideal solution (higher is better).
- Rank: Orders the options based on their TOPSIS scores (1 is the best).
License
This project is licensed under the MIT License. See the LICENSE file for details.
Additional Information
- Python 3.6 or higher is required.
- Ensure the input data contains numerical values only for criteria columns.
- For questions or issues, please reach out to the package maintainer.
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_miet_102203012-1.0.0.tar.gz.
File metadata
- Download URL: topsis_miet_102203012-1.0.0.tar.gz
- Upload date:
- Size: 5.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
17a1bcaa322a4c1a4dabe6b17bf5e33921362a2cbd0850769e1b48ea41d072a6
|
|
| MD5 |
748029088adabc459a639260fe2f2486
|
|
| BLAKE2b-256 |
d0ca4d9122182ef013602f473ba17037c1abc655bc2a48595da4cf1d84f1da98
|
File details
Details for the file Topsis_Miet_102203012-1.0.0-py3-none-any.whl.
File metadata
- Download URL: Topsis_Miet_102203012-1.0.0-py3-none-any.whl
- Upload date:
- Size: 5.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fae1b055b56495a1a3ea83e5c06bf085c988858581e9e45949d597a3bbecb17f
|
|
| MD5 |
b70d47868519d8d6bb04be9ee827ff57
|
|
| BLAKE2b-256 |
0d2ac25954886be7afe1b616f33fda5795f5df71b4ed7265190bc21fb636b3a6
|