Skip to main content

A Python package for TOPSIS implementation

Project description

TOPSIS-Vikas-102303451

PyPI version License

Project Description

TOPSIS (Technique for Order of Preference by Similarity to Ideal Solution) is a multi-criteria decision analysis method. It evaluates alternatives based on their geometric distance to the ideal best value and the ideal worst value.

This project implements TOPSIS in Python and provides three interfaces:

  1. Command Line Interface (CLI): For quick local usage.
  2. Python Package: Reusable library for your scripts.
  3. Web Service: A user-friendly web app to upload data and get results via email.

Live Web Service

The web application is deployed and accessible at:

https://topsis-vikas-102303451.vercel.app


Installation & Usage

1. Python Package

Install from PyPi:

pip install Topsis-Vikas-102303451

Use in your code:

from topsis_vikas import topsis

# topsis(input_file, weights, impacts, output_file)
topsis("data.csv", "1,1,1,1", "+,+,+,-", "output.csv")

2. Command Line Interface

topsis data.csv "1,1,1,1" "+,+,+,-" result.csv
  • Weights: Comma-separated (e.g., 1,1,1,1)
  • Impacts: Comma-separated + or - (e.g., +,+,+,-)
  • Input File: Must contain numeric values from 2nd to last column.

How TOPSIS Works

  1. Normalization: Normalize the decision matrix so that each criterion is comparable.
  2. Weighting: Multiply the normalized matrix by the weights of each criterion.
  3. Ideal Best & Worst: Identify the ideal best and ideal worst values for each column.
  4. Separation Measures: Calculate Euclidean distance of each alternative from the ideal best and worst.
  5. Score Calculation: Calculate the performance score.
  6. Ranking: Sort alternatives by score in descending order.

Author

Vikas Verma

Constructed with ❤️ for the Thapar Institute of Engineering & Technology.

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_vikas_102303451-1.0.1.tar.gz (4.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_vikas_102303451-1.0.1-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

Details for the file topsis_vikas_102303451-1.0.1.tar.gz.

File metadata

  • Download URL: topsis_vikas_102303451-1.0.1.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.7

File hashes

Hashes for topsis_vikas_102303451-1.0.1.tar.gz
Algorithm Hash digest
SHA256 5bcaef0f51f7546d332e736aa215363ecfaa0bdc72691386fd4faacd6eaa829a
MD5 bd0655c68e56af30d777445b94d9e003
BLAKE2b-256 9dfc20bd4c1ffb67d3171da4a4525ec08ba0cbdcce8c4751366b8c847f77bc62

See more details on using hashes here.

File details

Details for the file topsis_vikas_102303451-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for topsis_vikas_102303451-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 cf4ca31d33f1eda8a0d6dba7ddb4c9af05ab4e4e663f820a28f656f9fbfd3abb
MD5 92ddb90f3366b263a121cdef1ae8cfcc
BLAKE2b-256 781a25d47f221153b8665d0473ed16d11585cf6aec16ce90e3f29fdbe3a8175e

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