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.2.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.2-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: topsis_garima_102303542-0.0.2.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.2.tar.gz
Algorithm Hash digest
SHA256 c851b1b3a0a2968f7903bb4283ab6ca565c3fa42ba3f14d44483459a68ba36a5
MD5 5a64b8fd5a8c7e710dfccc0281342915
BLAKE2b-256 11a7d3eec739b27c727a90a9bdd844f77e4e3e971e28fdeb4faec0addaf4a7b4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for topsis_garima_102303542-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 7dbd359df70d2d2dae845a91e62bc860da95e17cc6e06d8e1b027e7569659d14
MD5 5e6ded75ea5ea6f6c0974505eed2d3ec
BLAKE2b-256 e7bf6776fc4d28348e6ea89279357f2381d1b34ee6f0c451a744a17d5f3cbd82

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