Skip to main content

A Python package to perform TOPSIS (Technique for Order Preference by Similarity to Ideal Solution).

Project description

TOPSIS Implementation in Python

This project demonstrates the implementation of the Technique for Order Preference by Similarity to Ideal Solution (TOPSIS) algorithm in Python. The method is used to rank alternatives based on multiple criteria, considering their respective weights and impacts (benefit or cost).

Key Features

  • Robust Input Validation: Ensures the correctness of input parameters, file formats, and consistency in weights and impacts.
  • Comprehensive Error Handling: Handles issues such as invalid data, incorrect file formats, and mismatched inputs gracefully.
  • Detailed Outputs: Generates a CSV file containing the computed scores, rankings, and the original dataset columns.

You can access the package through this link.

How to Use

  1. Clone the repository and navigate to the project folder.
  2. Ensure Python and required libraries are installed on your system.
  3. Run the program using the following command:
    python -m topsis_Saurabh_102203677.topsis <InputDataSet.csv> <Weights> <Impacts> <ResultFile.csv>
    

Example Input Dataset

TOPSIS Example

Weights Example

Weights for criteria:

[1, 1, 1, 1, 1]

Impacts Example

Impacts for criteria:

['-', '+', '+', '-', '+']
  • + indicates a benefit criterion.
  • - indicates a cost criterion.

Example Output

Result

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

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for topsis_saurabh_102203677-1.0.0.tar.gz
Algorithm Hash digest
SHA256 c42c082e33a08f1d3183e5418f814586a2180bc354e177e67d7710772b38ed40
MD5 1acdfd9f7556123e0fe964f9d5b8ee66
BLAKE2b-256 60467b35faae3708a4f544fe097156dc8108c71f1278669a8073c3084fffd741

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for topsis_Saurabh_102203677-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 897143f47b2909b6cdaf3fd95e97fb7d4c8cef3354e5991276c8e56e3137230e
MD5 2c2bcac39cb9ce1ba1be2ec2dbe89996
BLAKE2b-256 23eedbdbe3f5f981904544207a662a62ea7fb9506565c7c6df669d0c3d9ff616

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