Skip to main content

A Python package for implementing TOPSIS for multi-criteria decision making

Project description

TOPSIS-Tanisha-102203818

Effortlessly rank and evaluate alternatives using the TOPSIS method for multi-criteria decision-making.


🌟 Introduction

TOPSIS (Technique for Order of Preference by Similarity to Ideal Solution) is a decision-making approach designed to handle complex scenarios involving multiple criteria. With this package, users can seamlessly compute rankings based on their data, weights, and impact preferences.


💡 Key Features

  • Simplifies multi-criteria decision-making through an easy-to-use command-line interface.
  • Fully customizable to user-defined weights and impacts.
  • Provides accurate scores and ranks for alternatives based on the TOPSIS methodology.
  • Supports flexible .csv input and output formats.

🔧 Installation Guide

Install the package directly from PyPI: bash pip install topsis-Tanisha-102203818

Alternatively, clone the GitHub repository to use it locally: bash git clone https://github.com/tanisha1234-sys/topsis-Tanisha-102203818.git cd topsis-Tanisha-102203818 pip install -r requirements.txt


🚀 How to Use

The package can be executed via the command line with the following syntax:

bash python <program.py>

Example Usage:

bash

python 102203818.py data.csv "1,2,3,4" "+,-,+,-" result.csv

Parameters:

  • InputDataFile: Path to the input .csv file containing the data.
  • Weights: Comma-separated numeric values representing the weights of each criterion.
  • Impacts: Comma-separated values (+ or -) indicating whether the criterion is beneficial or non-beneficial.
  • ResultFileName: Path to save the result as a .csv file.

📝 Input Requirements

The input .csv file must:

  1. Contain at least three columns:
    • The first column should list the alternatives (e.g., Option1, Option2).
    • The remaining columns should contain numeric values representing criteria.
  2. Be properly formatted with no missing or non-numeric values in the criteria columns.

Sample Input (data.csv):

Object Criterion 1 Criterion 2 Criterion 3 Criterion 4
A1 25 30 45 20
A2 35 25 50 15

📊 Output File

The output .csv file includes all the columns from the input file with two additional columns:

  • Topsis Score: The relative closeness to the ideal solution.
  • Rank: The position of each alternative based on its TOPSIS score.

Example Output (result.csv):

Object Criterion 1 Criterion 2 Criterion 3 Criterion 4 Topsis Score Rank
A1 25 30 45 20 0.76 1
A2 35 25 50 15 0.65 2

🛠 Error Handling

The program ensures:

  • Correct input format and number of parameters.
  • Validation of numeric criteria and proper weights/impacts format.
  • Graceful handling of file-related errors (e.g., missing files).

📦 Dependencies

Ensure the following libraries are installed:

  • numpy
  • pandas

Install them via: bash pip install numpy pandas


📚 Additional Resources


👤 About the Author


📝 License

This project is licensed 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

topsis_tanisha_102203818-0.1.2.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

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

topsis_Tanisha_102203818-0.1.2-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

Details for the file topsis_tanisha_102203818-0.1.2.tar.gz.

File metadata

File hashes

Hashes for topsis_tanisha_102203818-0.1.2.tar.gz
Algorithm Hash digest
SHA256 42de19aff7e2eb8a9891a580c9959c9cfa81b80207887602681ad2b800f36a12
MD5 47cad713c4a1a8c2a83de270144831e7
BLAKE2b-256 0179ab43552b075d310359386ed24a62b830db6efdeb3df3204bdf0fafd5f3c5

See more details on using hashes here.

File details

Details for the file topsis_Tanisha_102203818-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for topsis_Tanisha_102203818-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 34d741891d6d870cbef84f46bef3f790bc5567e738524e46fe33e53d161fbea5
MD5 a2954c5c78517dc8f30b22f64f89f634
BLAKE2b-256 8264b955a7a445062ffa9a5f5c035bbb3481c2f2a84588bcb885f5299e50c493

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