Skip to main content

Ranking alternatives based on similarity.

Project description

TOPSIS Python Package

Overview

TOPSIS (Technique for Order of Preference by Similarity to Ideal Solution) is a multi-criteria decision analysis (MCDA) method for ranking and selecting alternatives based on multiple criteria.

Features

  • Ranking of options based on multiple criteria
  • Flexible weight and impact specification
  • Ideal solution distance calculation
  • CSV input and output support

Installation

pip install topsis-package

Usage

Command-Line Syntax

python -m topsis.topsis <input_data.csv> <weights> <impacts> <result.csv>

Parameters

  1. input_data.csv: CSV file with options and criteria values
  2. <weights>: Comma-separated criterion weights (e.g., "1,1,2,2,1")
  3. <impacts>: Comma-separated criterion impacts ("+,+,-,-,-")
  4. result.csv: Output CSV file for results

Example

python -m topsis.topsis input_data.csv "1,1,2,2,1" "+,+,-,-,-" result.csv

Input CSV Format

Option Criterion1 Criterion2 Criterion3 Criterion4 Criterion5
Option1 7 9 6 8 7
Option2 8 7 9 7 8
Option3 6 5 8 6 5

Output CSV Format

Option Distance from Ideal Best Distance from Ideal Worst TOPSIS Score Rank
Option1 2.5 5.0 0.6667 1
Option2 3.0 4.5 0.6 2
Option3 3.5 3.0 0.4615 3

Requirements

  • Python 3.6+
  • Clean numerical input data

License

© 2025 Kaustubh Singh MIT License

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_kaustubh_102203194-1.0.0.tar.gz (4.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_Kaustubh_102203194-1.0.0-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for topsis_kaustubh_102203194-1.0.0.tar.gz
Algorithm Hash digest
SHA256 887d9e5edbfb95bf228ebf1bdabe26ee8c53b43da020b0d3e3732121acb36cb0
MD5 b35754428e7e64cb184be35045a57235
BLAKE2b-256 4682aee444ddb0c7807ab99a47049067cc8080288ce4d37b6e1ef3a89cf684c0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for Topsis_Kaustubh_102203194-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 427768f77dd9a6a9024d1c1642882a56d76402f9c569691640eaad7a44930200
MD5 020d1dbfa951d0da489c93a49e608fe7
BLAKE2b-256 b505f6cdf04945fd875d59015b205cb3efb317bbdc4044faeb3f6af04f22efd4

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