Skip to main content

This Package will help you to calculate TOPSIS Score for multiple criteria...

Project description

TOPSIS Implementation in Python...


Overview

This Python script implements the TOPSIS (Technique for Order of Preference by Similarity to Ideal Solution) method for multi-criteria decision-making. It calculates the performance score and rank for given data based on user-defined weights and impacts.


Usage

Run the script with the following command:

python topsis.py <inputFileName> <weights> <impacts> <resultFileName>
  • <inputFileName>: Path to the CSV file containing the dataset.
  • <weights>: Comma-separated weights for the criteria (e.g., 1,2,3).
  • <impacts>: Comma-separated impacts for the criteria (+ for benefit, - for cost).
  • <resultFileName>: Name of the output file where results will be saved.

Input File Requirements

  1. Must be a .csv file with at least 3 columns.
  2. The first column can contain non-numeric values (e.g., IDs).
  3. Columns from the 2nd to the last must contain numeric values only.

Features

  • Validation:
    • Ensures correct number of inputs.
    • Validates weights, impacts, and column counts.
    • Handles missing or invalid files.
  • Error Handling:
    • Displays user-friendly messages for issues like file not found, non-numeric data, or mismatched input parameters.
  • Output:
    • Adds two new columns: Topsis Score and Rank.
    • Saves the results in the specified output file.

Dependencies

  • Python 3.x
  • Required libraries: pandas, math, sys

Install dependencies using:

pip install pandas

License

This project is open-source and free to use under the 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

abhishek_topsis-0.0.1.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

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

abhishek_topsis-0.0.1-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

Details for the file abhishek_topsis-0.0.1.tar.gz.

File metadata

  • Download URL: abhishek_topsis-0.0.1.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.1

File hashes

Hashes for abhishek_topsis-0.0.1.tar.gz
Algorithm Hash digest
SHA256 c639c6b419c970b1d4e3613b880d3dc6a09dc346fa674be16399ef0b777228dd
MD5 f9009c95a4bba8ec8eeb966ba806e84a
BLAKE2b-256 0eb6878577af5d935cd757910b5a6a5412ba340171f69f73dec6a77d9bb1878b

See more details on using hashes here.

File details

Details for the file abhishek_topsis-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for abhishek_topsis-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ff7744382e2248e5cd4135fb61ab5bab124693da56014b0111b85450ece4dbb6
MD5 2059bd77bbe43314b9b06daf5c86247f
BLAKE2b-256 0b91fb7998c5a5802739407c19093750b457a6da5df6668f6e940aef198fad7a

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