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 Shivane Kapoor 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_shivane_102203191-1.0.0.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

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

Topsis_Shivane_102203191-1.0.0-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for topsis_shivane_102203191-1.0.0.tar.gz
Algorithm Hash digest
SHA256 f9a9fef801aee61e64bfb9230611a34911c4e01f38a2262ad9c3a977bdfcc99b
MD5 25ca24a26befb9f6bf134e924f59ec89
BLAKE2b-256 d702b26637bb230165d8cc50638db6a30e603a23f9adc92c4b526e49d5c291b2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for Topsis_Shivane_102203191-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 73e96861c1d2726b0802cbe76a06b49d5faeb04992890c284e6dfbcebb9e296d
MD5 8af8c48e162de443ff92eec5d7c8bfd0
BLAKE2b-256 4a0046c4debfc7fb25be183dac9a46e49685ca846c9a69ed173e2b097a188208

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