Skip to main content

A Python package to perform TOPSIS.

Project description

TOPSIS: A Python Implementation

This project provides an implementation of the Technique for Order Preference by Similarity to Ideal Solution (TOPSIS), a widely-used decision-making method. The algorithm evaluates and ranks alternatives based on multiple attributes, considering the importance of each attribute (weights) and its impact type (benefit or cost).

Features

  • Validation of Inputs: Ensures proper formatting of input data, weights, and impacts for consistent processing.
  • Comprehensive Error Handling: Manages issues like missing files, invalid data, and incorrect input parameters.
  • Output Results: Generates a CSV file that includes original data, calculated scores, and rankings.

How to Run

  1. Clone the repository and navigate to the project directory.

  2. Ensure Python and the required dependencies are installed.

  3. Execute the program using the following command:

    python -m topsis_shamma_102253003.topsis <InputDataSet.csv> <Weights> <Impacts> <Result.csv>
    

Example Usage

  • Input File: A CSV file containing the dataset where each column represents an attribute, and each row represents an alternative.
  • Weights: Specify the importance of each attribute as a list (e.g., [1, 2, 3, 4, 5]).
  • Impacts: Define whether each attribute is a benefit (1) or a cost (0) (e.g., [1, 0, 1, 1, 0]).
  • Output File: A CSV file with calculated TOPSIS scores and rankings.

Input Dataset Example

Input Dataset Example

Example Weights

[1, 1, 1, 1, 1]

Example Impacts

[1, 0, 1, 0, 1]
  • 1 indicates a benefit
  • 0 indicates a cost

Output

The resulting file includes:

  • Original data
  • Calculated TOPSIS scores
  • Rankings based on the scores

Output Example

Additional Resources

The package is available on PyPI. You can access it through the following link:

TOPSIS Package on PyPI

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_shamma_102253003-1.0.0.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_Shamma_102253003-1.0.0-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: topsis_shamma_102253003-1.0.0.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.4

File hashes

Hashes for topsis_shamma_102253003-1.0.0.tar.gz
Algorithm Hash digest
SHA256 70f834f56432808d3259bab553bd23ab66fb3af15869e2241d21cdd453880541
MD5 f552155ddd70d147d4fe3cd90c061a43
BLAKE2b-256 dbae2b059b9066fe5459042021332b7ecfff825e5992a7c3bfafc1ba5f9d2484

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for topsis_Shamma_102253003-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 473050c5a8b5491032379b999226c25499bbf5927dd4154efdd58455b31a6527
MD5 87c572275e2310cbbf1a15b5a3d0b645
BLAKE2b-256 dfd5e43b6ba73713153b34fcfed979559a8b310a64d9b9d33d718edf52c58b1d

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