Skip to main content

A Python package for TOPSIS multi-criteria decision making

Project description

Topsis-Prabhsimar-102483078

📌 Description

This package implements the TOPSIS (Technique for Order Preference by Similarity to Ideal Solution) method, a popular multi-criteria decision-making (MCDM) technique.

TOPSIS is used to rank alternatives based on their relative distance from:

  • an ideal best solution
  • an ideal worst solution

It helps decision-makers choose the best option among multiple alternatives.


🧠 Applications of TOPSIS

TOPSIS is widely used in:

  • Product selection and comparison
  • Supplier evaluation
  • Project prioritization
  • Performance assessment
  • Resource allocation
  • Investment analysis

⚙️ Installation

Install the package using pip:

pip install Topsis-Prabhsimar-102483078

🚀 Usage

After installation, the topsis command becomes available in the terminal.

Basic Syntax

topsis <input_csv> <weights> <impacts> <output_csv>

Parameters

Parameter Description
input_csv Path to the CSV file containing the decision matrix
weights Comma-separated numerical weights for each criterion
impacts Comma-separated impacts (+ for benefit, - for cost)
output_csv Path where the output CSV file will be saved

📊 Example

Input File (sample.csv)

Model,Storage(in GB),Camera(in MP),Price(in $),Rating
M1,16,12,250,5
M2,16,8,200,3
M3,32,16,300,4
M4,32,8,275,4
M5,16,16,225,2

Decision Criteria

Weights Vector

0.25,0.25,0.25,0.25

Impacts Vector

+,+,-,+
  • Storage → Benefit (+)
  • Camera → Benefit (+)
  • Price → Cost (-)
  • Rating → Benefit (+)

Command

topsis sample.csv "0.25,0.25,0.25,0.25" "+,+,-,+" output.csv

📈 Output

The output CSV file will contain two additional columns:

  • Topsis Score (closeness coefficient)
  • Rank

Sample Output

Model Storage Camera Price Rating Topsis Score Rank
M3 32 16 300 4 0.69 1
M4 32 8 275 4 0.53 2
M1 16 12 250 5 0.53 3
M5 16 16 225 2 0.40 4
M2 16 8 200 3 0.30 5

📋 Input File Requirements

  • CSV format only
  • First column must contain alternative names
  • Remaining columns must be numeric
  • No missing values
  • Minimum 2 criteria columns required

⚠️ Important Notes

  • Number of weights must equal number of criteria columns
  • Number of impacts must equal number of criteria columns
  • Weights must be positive numbers
  • Impacts must be either + or -
  • All criterion values must be numeric

🔧 How TOPSIS Works

  1. Normalize the decision matrix
  2. Apply weights to normalized values
  3. Determine ideal best and ideal worst solutions
  4. Compute distances from ideal best and worst
  5. Calculate closeness coefficient
  6. Rank alternatives based on score

📝 License

This project is licensed under the MIT License.


👤 Author

Prabhsimar Singh
Roll Number: 102483078


📚 Academic Note

This package was developed as part of an academic assignment for
UCS654 – Prescriptive Analytics

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_prabhsimar_102483078-1.0.5.tar.gz (4.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_prabhsimar_102483078-1.0.5-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

Details for the file topsis_prabhsimar_102483078-1.0.5.tar.gz.

File metadata

File hashes

Hashes for topsis_prabhsimar_102483078-1.0.5.tar.gz
Algorithm Hash digest
SHA256 f8f3c5853be5fb436ce63d099a351a117c4bde74e0464394e3ddd3750a9e6c8c
MD5 da07a1afe1a5578643f254bd0ee178a3
BLAKE2b-256 46287c455eb41496b55add8c349c323ca36c0fb050d99875f28a5739a005da98

See more details on using hashes here.

File details

Details for the file topsis_prabhsimar_102483078-1.0.5-py3-none-any.whl.

File metadata

File hashes

Hashes for topsis_prabhsimar_102483078-1.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 044ff7fbb754b9ff9fd15dd87b8dc5da5601a4f5fe8f235bd0277d8860ddbc75
MD5 d565cf4b0a90bbfd8cedd411a4be11d8
BLAKE2b-256 6b8b1a6b6c4775bb9b9db589b9449c4a9853cd0ae1814cca36ff3c6304e5ea1f

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