Skip to main content

A Python package to implement the TOPSIS method for multi-criteria decision analysis.

Project description

Topsis Package

A Python package to calculate TOPSIS (Technique for Order Preference by Similarity to Ideal Solution) scores for decision-making.

Installation

Install the package from PyPI using pip:

pip install Topsis-Chahat-102203637

Usage

Run the TOPSIS algorithm via the command line using the topsis-cli tool.

topsis-cli <input_file.csv> <weights> <impacts> <output_file.csv>

Arguments

  • <input_file.csv>: Path to the input CSV file with alternatives and criteria.
  • : Comma-separated list of weights for each criterion (e.g., 0.3, 0.4, 0.3).
  • : Comma-separated list of impacts for each criterion (+ for positive, - for negative).
  • <output_file.csv>: Path for saving the output with TOPSIS scores.

Example

topsis-cli input.csv 0.3,0.4,0.3 +,+,- output.csv

Example Input File (input.csv):

Model P1 P2 P3
Model1 25 35 30
Model2 30 40 35
Model3 20 30 25

Sample Output:

Output File (output.csv):

Model P1 P2 P3 Topsis Score Rank
Model1 25 35 30 0.72 1
Model2 30 40 35 0.85 2
Model3 20 30 25 0.60 3

How It Works:

  1. Normalization:
    The input data is normalized using the root sum of squares method for each column.

  2. Weight Normalization:
    The normalized data is then weighted according to the provided weights.

  3. Best and Worst Values:
    The best and worst values for each criterion are determined based on the given impacts.

  4. Performance Calculation:
    The Euclidean distance to the best and worst values is computed, and a performance score is generated.

  5. Ranking:
    The alternatives are ranked based on their performance scores.

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_chahat_102203637-0.1.0.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_Chahat_102203637-0.1.0-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

Details for the file topsis_chahat_102203637-0.1.0.tar.gz.

File metadata

  • Download URL: topsis_chahat_102203637-0.1.0.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.3

File hashes

Hashes for topsis_chahat_102203637-0.1.0.tar.gz
Algorithm Hash digest
SHA256 3f325fbbaa9b360124747b64629abe1cdf2f23f64aed2a9d5b1fe24eb9f80f32
MD5 a28bb233eef9f777deb154ce78e977a0
BLAKE2b-256 a0022f5af813b0bececbaf48fe13e4a2b123cb22be978d02557fcc9f7b848aa0

See more details on using hashes here.

File details

Details for the file Topsis_Chahat_102203637-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for Topsis_Chahat_102203637-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6e82bc385e31c79884019028676e90ee52c15ed496f2fbbca71252529b895df6
MD5 8f6e1fe2dfbbf024ec5218faca137a40
BLAKE2b-256 470265be282a3a013c9d66d8593e648038f413b6020ee8aa6a19f6bbcaafed98

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