Skip to main content

A Python package for TOPSIS

Project description

TOPSIS

This script calculates the TOPSIS (Technique for Order Preference by Similarity to Ideal Solution) score and ranks alternatives based on the provided decision matrix, weights, and impacts. It uses the weights and impacts to determine the ideal best and worst values, then calculates the distance of each alternative from these values to derive the final score and ranking.

Installation

There are no external dependencies, but you need to have Python and pandas installed to run the script.

pip install Topsis-Paras-102203836

How to use it?

Step 1: Prepare the Data

The input data should be a CSV file containing the following columns:

The first column should contain the fund names. The remaining columns should contain the criteria values for each alternative (row).

Step 2: Run the Script

To run the script, use the following command in the terminal:

python -m Topsis-Paras-102203836.topsis data.csv "1,1,1,2,1" "+,+,-,+,-" results.csv

Where:

data.csv is your input CSV file (e.g., data.csv).

"1,1,1,2,1" is a comma-separated string of weights for each criterion (e.g., "1,1,1,2,1").

"+,+,-,+,-" is a comma-separated string of impacts for each criterion (e.g., "+,+,-,+,-").

results.csv is the file where the results will be saved (e.g., results.csv).

Step 3: Output

The output will be a CSV file with the calculated TOPSIS scores and ranks for each alternative. ...

Link to my package

https://pypi.org/project/Topsis-Paras-102203836/

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_paras_102203836-1.0.6.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

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

topsis_paras_102203836-1.0.6-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

Details for the file topsis_paras_102203836-1.0.6.tar.gz.

File metadata

  • Download URL: topsis_paras_102203836-1.0.6.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.4

File hashes

Hashes for topsis_paras_102203836-1.0.6.tar.gz
Algorithm Hash digest
SHA256 df4a47a5a73441cf44c9f22007b60773d11cb4e581779f4e137515c1844fe430
MD5 b5ed7a87702a93bf538e647dae6130fe
BLAKE2b-256 7aaef83485c64dac8495d71f8add004b0100726a2694fbfa46bb2e84e2e001f0

See more details on using hashes here.

File details

Details for the file topsis_paras_102203836-1.0.6-py3-none-any.whl.

File metadata

File hashes

Hashes for topsis_paras_102203836-1.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 b97fbd391195cba414b2a09ef5f0a03aa4d5d2f451cdabce9cf5da6e8197d9ea
MD5 869047ce9a1aeaa675d923cc465f48ba
BLAKE2b-256 1ba524fb5fe67bda153aaef943bfa02718c1ef67c53d8813e9b5acd305223ce8

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