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:

  • Topsis Score
  • Rank
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

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.3.tar.gz (3.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_prigya_102313061-1.0.3-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: topsis_prigya_102313061-1.0.3.tar.gz
  • Upload date:
  • Size: 3.4 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.3.tar.gz
Algorithm Hash digest
SHA256 36ae363eb1a8eaced7ff2cc14ca95952edbe45445edba10fcc016f8a21fa0e84
MD5 dfb00d371e594b80c5c322aa71223a01
BLAKE2b-256 423fb52b9e75020b4a2116ba2ac8e91b7e972d915e9dcc6ca3c6718ea2d99b90

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for topsis_prigya_102313061-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 c68f659068b7eef5e85228548b1ad7838d5a0026effa6a6d75d6f1766c68e7bf
MD5 4f7f9456d3c32c213c60a651149d97d8
BLAKE2b-256 6a2802c441cf27ca0a689059d64b60daca16010fbefb98b77c1dbb77e79c6194

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