Skip to main content

A Python package for TOPSIS implementation

Project description

Topsis-Anshika-10123456

Overview

This package implements the TOPSIS (Technique for Order Preference by Similarity to Ideal Solution) method using Python.

TOPSIS is a multi-criteria decision-making technique used to rank alternatives based on their distance from an ideal best and an ideal worst solution.

This package can be used directly from the command line after installation.


Package Name

TOPSIS-ANSHIKA-102303042


Installation

Install the package from PyPI using pip: pip install TOPSIS-ANSHIKA-102303042


Usage (Command Line)

topsis


Example

topsis data.csv "1,1,1,2" "+,+,-,+" result.csv


📥 Input File Format

  • The input file must be in CSV format
  • The first column should contain names of alternatives
  • Remaining columns should contain numeric values only
  • Minimum 3 columns are required

Sample Input

Fund Name,P1,P2,P3,P4 M1,0.67,0.45,6.5,42.6 M2,0.60,0.36,3.6,53.3 M3,0.82,0.67,3.8,63.1


📤 Output File Format

The output file is a CSV file containing:

  • Topsis Score – relative closeness to the ideal solution
  • Rank – ranking based on TOPSIS score

Higher score indicates a better alternative.


Methodology (Brief)

  1. Read input data from CSV file
  2. Normalize the decision matrix
  3. Apply weights to the normalized matrix
  4. Determine ideal best and ideal worst values
  5. Calculate distance from ideal best and worst
  6. Compute TOPSIS score
  7. Rank alternatives based on the score

Error Handling

The package checks for:

  • Incorrect number of arguments
  • File not found errors
  • Non-numeric values in criteria columns
  • Mismatch in number of weights and impacts
  • Invalid impact values (only + or - allowed)

Dependencies

  • Python 3.x
  • Pandas
  • NumPy

Conclusion

This package provides a simple and effective way to perform TOPSIS analysis using Python. It is useful for decision-making problems involving multiple criteria.

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_anshika_102303042-0.0.2.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_anshika_102303042-0.0.2-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

Details for the file topsis_anshika_102303042-0.0.2.tar.gz.

File metadata

File hashes

Hashes for topsis_anshika_102303042-0.0.2.tar.gz
Algorithm Hash digest
SHA256 d39c95849e9d531d1c2e160e104b2a7902b89bb537c47cbd43f7fe1ad120e552
MD5 26d04cefd1f2c0264d10e168ad8f5da7
BLAKE2b-256 53cfa73755f069568cb6542823aef867393e40e50e91c0a789e6983c8096cad3

See more details on using hashes here.

File details

Details for the file topsis_anshika_102303042-0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for topsis_anshika_102303042-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d24715b1b292ad9a1497f0748d188009f11a9feb92b68488f6f2675f7065dc06
MD5 7ce8ec52b2c5203c4e3165dc4cb7a598
BLAKE2b-256 2204901c0c982368f475f457b9f78e74f11bbe6f19477cf315d44a35b1d0bc5e

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