Skip to main content

TOPSIS implementation in Python (Command Line Tool)

Project description

TOPSIS Implementation in Python

This project provides a command-line implementation of the TOPSIS (Technique for Order Preference by Similarity to Ideal Solution) method using Python.
It allows ranking of alternatives based on multiple criteria, weights, and impacts.


What is TOPSIS?

TOPSIS is a multi-criteria decision-making (MCDM) technique used to rank alternatives by comparing their distances from an ideal best and an ideal worst solution.

The best alternative:

  • Has the shortest distance from the ideal best
  • Has the farthest distance from the ideal worst

Project Structure

102303542_TOPSIS/ │ ├── topsis/ │ ├── init.py │ └── topsis.py │ # Main TOPSIS implementation (CLI) │ ├── plot_graphs.py │ # Script to generate graphs │ ├── README.md │ # Project documentation │ ├── .gitignore │ ├── Topsis-Dataset.csv │ # Sample input dataset │ ├── text_classification_result.csv │ # Example TOPSIS output │ ├── modelResults.csv │ ├── topsis_scores.png │ # TOPSIS score graph │ └── topsis_ranking.png | # Ranking graph

Requirements

  • Python 3.x
  • numpy
  • pandas
  • matplotlib(for graphs)

Install dependencies using: pip install numpy pandas matplotlib


Usage(Command Line)

python topsis.py

Generate graphs using: python plot_graphs.py

Parameters: InputDataFile → CSV file with alternatives and criteria Weights → Comma-separated weights Impacts → + for benefit, - for cost ResultFileName → Output CSV file (auto-generated)

Input File Format: First column: Alternative names Remaining columns: Numeric criteria

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_garima_102303542-0.0.1.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

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

topsis_garima_102303542-0.0.1-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

Details for the file topsis_garima_102303542-0.0.1.tar.gz.

File metadata

  • Download URL: topsis_garima_102303542-0.0.1.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.7

File hashes

Hashes for topsis_garima_102303542-0.0.1.tar.gz
Algorithm Hash digest
SHA256 a28be0b44741bcb5cafa17d0b5d7999cbaec24ff6aa793cafa78788141715a0c
MD5 8fe291e272cdc5b1de4ea8dca632058e
BLAKE2b-256 cef7ec8fb2d0bbc287a3877b509074e5c7ece8be65084557e6191435ecb77a9d

See more details on using hashes here.

File details

Details for the file topsis_garima_102303542-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for topsis_garima_102303542-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 fbc3808477c7831379ca114d4716efebf7079e24e5a729b4dfaf5bc940bd1380
MD5 fcc5d8a77e3035ea1425144e1466a803
BLAKE2b-256 0e677c0ae4fd90774223c775e78a16d387c5301553a61a49a5733bf53985d32a

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