Skip to main content

Command line implementation of TOPSIS method

Project description

TOPSIS Python Package

This project implements the TOPSIS (Technique for Order Preference by Similarity to Ideal Solution) method as a command line tool.

TOPSIS is a multi-criteria decision making technique used to rank alternatives based on their distance from an ideal best and ideal worst solution.


Installation

pip install Topsis-Prigya-102313061

Input File Format

The input must be a CSV file with:

  • First column: Names of alternatives
  • Remaining columns: Numeric criteria values

Example Input CSV

Laptop Model Performance Battery Life Weight (kg) Price ($)
Model A 90 8 1.8 1200
Model B 85 10 1.5 1500
Model C 88 7 2.0 1000
Model D 92 9 1.6 1800

Meaning of Criteria

  • Performance → Higher is better (+)
  • Battery Life → Higher is better (+)
  • Weight → Lower is better (-)
  • Price → Lower is better (-)

Parameters Used

  • Weights vector = [1, 1, 1, 1]
  • Impacts vector = [+, +, -, -]

Command Line Usage

topsis data.csv "1,1,1,1" "+,+,-,-" output.csv

Output

The output CSV file will contain two additional columns:

Laptop Model Topsis Score Rank
Model A 0.534277 3
Model B 0.308368 4
Model C 0.691632 1
Model D 0.534737 2
  • Topsis Score
  • Rank

Notes

  • The first column must contain the names of alternatives.
  • All remaining columns must contain numeric values only.
  • Number of weights and impacts must match the number of criteria columns.

Requirements

  • Python 3.6+
  • pandas
  • numpy

Author

Prigya Goyal


License

This project is released under the MIT License for educational purposes. See the LICENSE file for details.

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_prigya_102313061-1.0.2.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

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

topsis_prigya_102313061-1.0.2-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file topsis_prigya_102313061-1.0.2.tar.gz.

File metadata

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

File hashes

Hashes for topsis_prigya_102313061-1.0.2.tar.gz
Algorithm Hash digest
SHA256 9d004a922e2988dd94b4591509c7a1442c95f68da38d5d176b45994bb588efb6
MD5 3737428b67a389bcd197a7a47759ff9c
BLAKE2b-256 589fe982fc2f19b4db338f4d418420ece196a435cecaff27ca9d0265048a127c

See more details on using hashes here.

File details

Details for the file topsis_prigya_102313061-1.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for topsis_prigya_102313061-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 7ad047d42a60d4e8b270c31b0db389732dd772ebe28685c1535a37738c763e62
MD5 797c09235f906b2c79347fc60ef41dbf
BLAKE2b-256 8adfd1c5832dcd4e88f17dc2a8268e5b7ebbfb27ff458d7f7dab77952679ba86

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