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.1.tar.gz (3.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_Sarika_102203880-1.0.1-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: topsis_sarika_102203880-1.0.1.tar.gz
  • Upload date:
  • Size: 3.8 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.1.tar.gz
Algorithm Hash digest
SHA256 ad00faf06bf7a2af6d2379cc65abdcb6b6f2cc1942988efb38bc1e9b1499e028
MD5 c3d06cffbc881fe44a551d7f7125da20
BLAKE2b-256 38480e1489f2eca7eb046cf2228bef8e4cda266c878da7eaf7814299d2d23691

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for Topsis_Sarika_102203880-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a3dce3b4682571e78a2966c58669d9d5113503170f59f406574bf321688a9c34
MD5 64d95ba215cf00b73c772d156044645c
BLAKE2b-256 1ef66140d2c1b6c0889de3b26ef3c320ab48e53fe55c71cae7db22c6b29c258f

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