Skip to main content

A command-line implementation of the TOPSIS method.

Project description

Topsis-Karan-102317145

This is a simple command-line implementation of the TOPSIS method in Python.

TOPSIS stands for Technique for Order Preference by Similarity to Ideal Solution.
It is a multi-criteria decision-making method used to rank alternatives based on multiple criteria.

This package allows you to:

  • Provide a CSV file
  • Provide weights for each criterion
  • Provide impact (+ or -) for each criterion
  • Automatically calculate TOPSIS score
  • Get ranking as output in a CSV file

What This Tool Does

  1. Cleans the dataset
  2. Handles numeric and ordinal data
  3. Drops invalid or text-only columns
  4. Normalizes the data
  5. Applies weights
  6. Calculates ideal best and worst
  7. Computes TOPSIS score
  8. Ranks alternatives
  9. Saves result in output CSV

Installation

You can install the package using pip:

pip install Topsis-Karan-102317145

Make sure you are using Python 3.8 or above.


Input File Format

Your CSV file must:

  • Have at least 3 columns
  • First column = Name / Identifier
  • Remaining columns = Criteria
  • Criteria must be numeric or ordinal

Example: alt text


How To Use (Command Line)

After installation, run: topsis data.csv "1,1,1" "-,+,+” output.csv

Explanation:

  • data.csv → Input file
  • "1,1,1" → Weights for each criterion
  • "- , + , +" → Impact for each criterion
    • + means benefit (higher is better)
    • - means cost (lower is better)
  • output.csv → Output file name

Output

The output file will look like: alt text

Higher score means better rank.


Important Notes

  • Number of weights must match number of criteria.
  • Number of impacts must match number of criteria.
  • Impacts must be only + or -.
  • Missing values are automatically handled.
  • Text-only columns are ignored.

Author

Karan
Roll No: 102317145


About TOPSIS

TOPSIS works by:

  1. Normalizing the data
  2. Applying weights
  3. Finding ideal best and worst values
  4. Measuring distance from ideal solution
  5. Ranking based on closeness

It is commonly used in decision-making problems like:

  • Product comparison
  • Supplier selection
  • Performance evaluation
  • Ranking alternatives

Thank you for using this package!!

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_karan_102317145-1.0.0.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_karan_102317145-1.0.0-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: topsis_karan_102317145-1.0.0.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.7

File hashes

Hashes for topsis_karan_102317145-1.0.0.tar.gz
Algorithm Hash digest
SHA256 8cd7595e11cd6e7a82680b41fbdabda8ad1405dd51267917c258886d110d17ca
MD5 9f7d11448a99079b50e227818eed01c2
BLAKE2b-256 a0763179ff00a805aa13c3030e041108c5c3b21aa6b06a9013a34e3dae3fe938

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for topsis_karan_102317145-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 231f6336a5ab0b4568eb76619714322e35823c416b1b9ad95c31340d3aa018ac
MD5 93fabc3ebc6e0bedca997a8ccfa47914
BLAKE2b-256 6c5fe372ba95ee53f37dbf09794ee57bbbd5138a100b1adbfae56e0da55f566c

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