Skip to main content

A Python package implementing TOPSIS method for Multi-Criteria Decision Making (MCDM)

Project description

TOPSIS Python Package

A Python package that implements the Technique for Order of Preference by Similarity to Ideal Solution (TOPSIS) method. This package helps in solving Multi-Criteria Decision Making (MCDM) problems by ranking alternatives based on multiple criteria.

Installation

pip install topsis-Sarabjeet-102203770

Usage

The package can be used both as a command-line tool and as a Python module.

Command Line Usage

python -m topsis <InputDataFile> <Weights> <Impacts> <ResultFileName>

Example:

python -m topsis data.xlsx "1,1,1,1,1" "+,-,+,-,+" result.csv

Input File Format

  • Excel file with .xlsx extension
  • First column: Fund/Alternative names
  • 2+ columns: Numerical values for criteria
  • Example:
    Fund Name | Return | Risk | Expense | ...
    Fund A    | 10     | 20   | 30     | ...
    Fund B    | 15     | 25   | 35     | ...
    

Parameters

  • Weights: Comma-separated values of weights (e.g., "1,1,1,1,1")
  • Impacts: Comma-separated +/- signs for maximizing/minimizing criteria (e.g., "+,-,+,-,+")
  • ResultFileName: Output CSV file name

Output

The program will create a CSV file containing the input data along with:

  • Topsis Score
  • Rank

Sample Python Usage

from topsis import topsis

topsis("input.xlsx", [1,1,1,1,1], ['+','-','+','-','+'], "output.csv")

License

This project is licensed under the MIT License - see the LICENSE file for details.

Author

Sarabjeet Singh (ssingh20_be22@thapar.edu)

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_sarabjeet_102203770-1.1.0.tar.gz (3.0 kB view details)

Uploaded Source

Built Distribution

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

topsis_Sarabjeet_102203770-1.1.0-py3-none-any.whl (3.3 kB view details)

Uploaded Python 3

File details

Details for the file topsis_sarabjeet_102203770-1.1.0.tar.gz.

File metadata

File hashes

Hashes for topsis_sarabjeet_102203770-1.1.0.tar.gz
Algorithm Hash digest
SHA256 c25f56df1f17267943b49981d8c1a1fefcae3e4b9adb351a986b43a205ef0cb3
MD5 aed1e814838d305a3bf2675d6d358b87
BLAKE2b-256 0c5e5a633af93d70894020123bcb6e02125a8e4b255f717b4cd4ee9d72ffd7c4

See more details on using hashes here.

File details

Details for the file topsis_Sarabjeet_102203770-1.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for topsis_Sarabjeet_102203770-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 75cdf87bf2ddfbf3aefc055c87319d1945a9a487badcde9e3ca230fed8295f7b
MD5 5b5af260c0b2c85ddcffd446799123cf
BLAKE2b-256 bc79b1c993d63095f5da3ee206074641286d7660795574fa759a78f65b72aec8

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