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_kashvi_102303564-1.0.0.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

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

topsis_kashvi_102303564-1.0.0-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

Details for the file topsis_kashvi_102303564-1.0.0.tar.gz.

File metadata

  • Download URL: topsis_kashvi_102303564-1.0.0.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.11

File hashes

Hashes for topsis_kashvi_102303564-1.0.0.tar.gz
Algorithm Hash digest
SHA256 80852fe63796bae1cbd2b3fcf9c9b9e6606d67455189fde19425aa9887886085
MD5 eea65e7706df62953d2f0d4eda6b8c2a
BLAKE2b-256 b11fe3285073684a0324010800a2f225a4286642ca8920d1f89eef12f8917bb7

See more details on using hashes here.

File details

Details for the file topsis_kashvi_102303564-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for topsis_kashvi_102303564-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ddbce4bf8c60bb152bff2f5535602dbbbec28d1c9a70e7ce3214e1d5f4b386d0
MD5 51afc6f5175da25183c06ac912323fe5
BLAKE2b-256 0442f13f11d491575e064e81b237858adba0d057c3b595c74cf8f02161a0b03a

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