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.

Installation Guide

Install from PyPI using:

pip install Topsis-Karan-102317145

After installation, you can use the topsis command directly in your terminal.


Command Line Usage

After installation, run:

topsis <InputDataFile> <Weights> <Impacts> <OutputFile>

Example:

topsis data.csv "1,1,1,1" "+,+,-,+" output.csv

Parameter Explaination

  • InputDataFile: CSV file containing alternatives and criteria
  • Weights: Comma-separated numeric weights (e.g., "1,1,1,1")
  • Impacts: Comma-separated '+' or '-' signs
  • OutputFile: Name of the result 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

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

Output

The output file will have 2 additional columns than the input file:

  1. The Topsis Score
  2. The Topsis Rank

Higher score means better rank.


Requirements

This package requires:

  • Python >= 3.8
  • pandas
  • numpy

These dependencies are automatically installed during pip installation.

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 Nigam Roll No: 102317145


License

This project is licensed under the MIT License.


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.1.tar.gz (5.1 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.1-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: topsis_karan_102317145-1.0.1.tar.gz
  • Upload date:
  • Size: 5.1 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.1.tar.gz
Algorithm Hash digest
SHA256 cb1ce37eda84a4d3cfebb6e1434cc8ab3f96ff6f9f502d8e8b8e395c2cdd1fc8
MD5 3d4f8268fc6bbf44f3424feaa8d1b270
BLAKE2b-256 41e6a7fe45f901720db760b610c91cd1b09f06b046c02a62f9b2d63a3ac1a356

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for topsis_karan_102317145-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5c52a1619b55838a3b5bee4e104e4d8fbdda1a0e2fc9c2a2ef10b333440658c7
MD5 98bdd4796a50f707116e34ba3c65c1e8
BLAKE2b-256 a9e1105aac11cd19968dafe4f0f09e9ebdcf02de5ba57a703bbc4a4df5cb157f

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