Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

topsis-3561-0.1.4.tar.gz (2.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

topsis_3561-0.1.4-py3-none-any.whl (2.5 kB view details)

Uploaded Python 3

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

Hashes for topsis-3561-0.1.4.tar.gz
Algorithm Hash digest
SHA256 1c296485b836ba54074e7bc4a5adcdc8136767c2c92683b4cc41a5c9f3e30084
MD5 cf22e50725ee3dbb61cfd112414f712f
BLAKE2b-256 0fcac1136cad8d3dff9ce2987cd4aed70596f4efe6e2da82a978a07d65a057d3

See more details on using hashes here.

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

Hashes for topsis_3561-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 9a7ff99dcf950ea830ce65ba0e8afbd208fed02db52eb7d5b80948519d79f979
MD5 cb98b92e9cef39265bcb21339d294d76
BLAKE2b-256 dd88ac565eefc20ba079db4df3ed878e5c2ff355ca0a98923ce02af8cef7bb89

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page