Skip to main content

TOPSIS Package

A Python package for decision-making using the TOPSIS method.


What is TOPSIS?

The Technique for Order Preference by Similarity to Ideal Solution (TOPSIS) is a multi-criteria decision analysis method.
It ranks alternatives based on their closeness to the ideal solution and farthest from the worst solution, making it an excellent tool for decision-making problems.


Features

  • Simple and efficient implementation of the TOPSIS algorithm.
  • Accepts a decision matrix via a CSV file.
  • Supports customizable weights and impacts for criteria.
  • Outputs the TOPSIS scores and ranks into an easy-to-read CSV file.

Installation

You can install the package from PyPI using:

pip install 102217186-abhaijeet-topsis==1.2.0

How to Use

Run the Package

You can run the TOPSIS package directly from the command line using:

python -m 102217186_abhaijeet_topsis <input_file> <weights> <impacts> <output_file>

Parameters

  • <input_file>: Path to the CSV file containing the decision matrix.
  • <weights>: Comma-separated weights for each criterion (e.g., 0.2,0.1,0.43,0.3).
  • <impacts>: Comma-separated impacts for each criterion (e.g., +,+,-,-, where + indicates a benefit criterion and - indicates a cost criterion).
  • <output_file>: Path to the output CSV file where the results will be saved.

Example Usage

Input CSV (input.csv)

input

Command

python -m 102217186_abhaijeet_topsis input.csv "0.2,0.1,0.4,0.3" "+,+,-,+"
output.csv

Output CSV (output.csv)

image


How It Works

  1. Normalization: The decision matrix is normalized to bring all criteria onto a comparable scale.
  2. Weighting: Each criterion is multiplied by its corresponding weight.
  3. Ideal Solutions: Calculates the ideal best and worst solutions based on the impacts.
  4. Distance Calculation: Computes the distance of each alternative from the ideal best and worst solutions.
  5. Ranking: Scores and ranks alternatives based on their relative closeness to the ideal solution.

License

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


Support

If you encounter any issues or have questions, feel free to open an issue on GitHub.


Metadata

Release files for 102217186-abhaijeet-topsis 1.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for 102217186-abhaijeet-topsis 1.2.0
File Size Uploaded Provenance Actions
102217186_abhaijeet_topsis-1.2.0.tar.gz 4.2 kB Without provenance Details for 102217186_abhaijeet_topsis-1.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for 102217186-abhaijeet-topsis 1.2.0
File Interpreter ABI Platform Actions
102217186_abhaijeet_topsis-1.2.0-py3-none-any.whl Python 3 none any Details for 102217186_abhaijeet_topsis-1.2.0-py3-none-any.whl

Total release size: 9.3 kB

Release files / 102217186_abhaijeet_topsis-1.2.0.tar.gz

Download URL 102217186_abhaijeet_topsis-1.2.0.tar.gz
Size 4.2 kB
Tags Source
SHA-256 checksum
How to use checksums
be34cec52e59eb224255a41a261eb0899ecaf8e1427eafe07e37ac56477ee96d
BLAKE2b-256 checksum
How to use checksums
a96e8979f8fa7ddb58dcab1fa2fa96699283bf31429e814300ded2a3557881c2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.11.9

Release files / 102217186_abhaijeet_topsis-1.2.0-py3-none-any.whl

Download URL 102217186_abhaijeet_topsis-1.2.0-py3-none-any.whl
Size 5.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2bb4ea412b3ff5d16b8412d1b7b7352e0ef1b0f128307da0182ce880da8d6f92
BLAKE2b-256 checksum
How to use checksums
3e589980a046f024c9de82922ae701be15e20a9aa50da4d27a925442b3e5f170
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.11.9

Security for 102217186-abhaijeet-topsis 1.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page