Implementation of Topsis
Project description
TOPSIS Implementation in Python
This repository contains a Python implementation of the TOPSIS (Technique for Order of Preference by Similarity to Ideal Solution) method. TOPSIS is a multi-criteria decision-making technique used to rank a set of alternatives based on their performance with respect to multiple criteria.
How to Use
Requirements
- Python 3
- pandas
- numpy
Installation
Install the required libraries using:
pip install pandas numpy
The topsis function takes a dataset, weights, and impacts as input, and it calculates the closeness to the ideal solution for each alternative. The weights represent the importance of each criterion, and the impacts signify whether a criterion should be maximized (1) or minimized (-1).
The function performs the following steps:
Normalize the decision matrix.
Multiply each column by the respective weight.
Find the ideal and negative-ideal solutions.
Calculate the separation measures.
Calculate the performance score.
Calculate the relative closeness to the ideal solution.
If there is a mismatch in the number of weights, impacts, and columns, a ValueError is raised.
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-3561-0.1.4.tar.gz.
File metadata
- Download URL: topsis-3561-0.1.4.tar.gz
- Upload date:
- Size: 2.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1c296485b836ba54074e7bc4a5adcdc8136767c2c92683b4cc41a5c9f3e30084
|
|
| MD5 |
cf22e50725ee3dbb61cfd112414f712f
|
|
| BLAKE2b-256 |
0fcac1136cad8d3dff9ce2987cd4aed70596f4efe6e2da82a978a07d65a057d3
|
File details
Details for the file topsis_3561-0.1.4-py3-none-any.whl.
File metadata
- Download URL: topsis_3561-0.1.4-py3-none-any.whl
- Upload date:
- Size: 2.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9a7ff99dcf950ea830ce65ba0e8afbd208fed02db52eb7d5b80948519d79f979
|
|
| MD5 |
cb98b92e9cef39265bcb21339d294d76
|
|
| BLAKE2b-256 |
dd88ac565eefc20ba079db4df3ed878e5c2ff355ca0a98923ce02af8cef7bb89
|