Skip to main content

A Python package for TOPSIS decision making.

Project description

TOPSIS Package

TOPSIS - Sarika-102203880 A Python Package for Multi-Criteria Decision Making using TOPSIS 📖 Introduction TOPSIS (Technique for Order of Preference by Similarity to Ideal Solution) is a multi-criteria decision-making method that ranks alternatives based on their distance from an ideal solution. This package helps in decision analysis by evaluating different alternatives based on weighted criteria and selecting the best option.

⚙ Installation To install this package from PyPI, run:

sh Copy code pip install TOPSIS - Sarika-102203880

📌 Usage Guide Once installed, you can use the package in Python as follows:

1️⃣ Import the Package python Copy code from Topsis.topsis import Topsis 2️⃣ Provide Input Data python Copy code data = [ [250, 16, 12, 5], [200, 16, 8, 3], [300, 32, 16, 4], [275, 32, 8, 4], [225, 16, 16, 2] ] weights = [0.25, 0.25, 0.25, 0.25] # Importance of each criterion impacts = ['+', '+', '-', '+'] # '+' for beneficial criteria, '-' for non-beneficial 3️⃣ Compute the TOPSIS Score python Copy code topsis = Topsis(data, weights, impacts) scores, ranks = topsis.calculate_topsis_score()

print("TOPSIS Scores:", scores) print("Ranks:", ranks) 4️⃣ Example Output less Copy code TOPSIS Scores: [0.62, 0.44, 0.78, 0.66, 0.32] Ranks: [3, 5, 1, 2, 4] The alternative with Rank = 1 is the best choice. 🔬 How Does TOPSIS Work? Normalize the Decision Matrix Each value is divided by the square root of the sum of squares for that criterion.

Apply Weights Each normalized value is multiplied by its corresponding weight.

Find Ideal Best & Ideal Worst Values

Ideal Best: The best value for each criterion (max for benefit, min for cost). Ideal Worst: The worst value for each criterion (min for benefit, max for cost). Calculate Separation Measures

Distance from Ideal Best Distance from Ideal Worst Compute TOPSIS Score Higher scores mean the alternative is closer to the ideal solution.

Rank the Alternatives The alternative with the highest TOPSIS score is Rank 1.

📜 License This project is licensed under the MIT License. You are free to use, modify, and distribute it.

🛠 Contributing Want to improve this package? Feel free to fork the repository and submit a pull request! 🎯

✉ Contact For any issues or queries, reach out at: 📧 Email: sarika090903@gmail.com 📌 GitHub: https://github.com/Sarikaa9

🎉 Enjoy Decision-Making with TOPSIS! 🚀 This version of README.md makes the package more professional and user-friendly. Let me know if you need more edits! 🚀

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_sarika_102203880-1.0.0.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

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

Topsis_Sarika_102203880-1.0.0-py3-none-any.whl (3.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: topsis_sarika_102203880-1.0.0.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.4

File hashes

Hashes for topsis_sarika_102203880-1.0.0.tar.gz
Algorithm Hash digest
SHA256 5c2a4a8b34a061e9ed0f9cb8ee5f688953f8dd5e9c80e0b04b4e41a339b383ec
MD5 323bfa7a3add835e93236a33a8fb54cc
BLAKE2b-256 01cf0cd6b7aa037231a3ad979dde1def598e378cf982ce69a0a476c8b227021e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for Topsis_Sarika_102203880-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 47436569edcf52bbb6a24dd64795c26c295ce6c58a3036b1a7cef64067f499b6
MD5 f7a8463d6eef83243c5287c5dff24236
BLAKE2b-256 e86cfec07952f900f2147cc2bb5d7e0ff4e61b9a506da38e28c8858129759170

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