Skip to main content

A Python package for TOPSIS (Technique for Order of Preference by Similarity to Ideal Solution)

Project description

Topsis-Mehul-102317146

Description

A Python package implementing TOPSIS (Technique for Order of Preference by Similarity to Ideal Solution) method for multi-criteria decision making.

Installation

pip install Topsis-Mehul-102317146

Usage

Command Line

topsis <InputDataFile> <Weights> <Impacts> <OutputResultFileName>

Example

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

Input File Format

The input file must be a CSV file with the first column as the object/variable name and the remaining columns as numeric criteria values.

Fund Name P1 P2 P3 P4 P5
M1 0.67 0.45 6.5 42.6 12.56
M2 0.6 0.36 3.6 53.3 14.47
M3 0.82 0.67 3.8 63.1 17.1
M4 0.6 0.36 3.5 69.2 18.42
M5 0.76 0.58 4.8 43 12.29
M6 0.69 0.48 6.6 48.7 14.12
M7 0.79 0.62 4.8 59.2 16.35
M8 0.84 0.71 6.5 34.5 10.64

Output File Format

The output file will contain the original data along with two additional columns: Topsis Score and Rank.

Fund Name P1 P2 P3 P4 P5 Topsis Score Rank
M1 0.67 0.45 6.5 42.6 12.56 20.58 2
M2 0.6 0.36 3.6 53.3 14.47 40.83 4
M3 0.82 0.67 3.8 63.1 17.1 30.07 3
M4 0.6 0.36 3.5 69.2 18.42 50.22 5
M5 0.76 0.58 4.8 43 12.29 10.41 1
M6 0.69 0.48 6.6 48.7 14.12 80.51 8
M7 0.79 0.62 4.8 59.2 16.35 70.74 7
M8 0.84 0.71 6.5 34.5 10.64 60.33 6

*Your input-data and output-result may be different.

Validations

  • Correct number of parameters (inputFileName, Weights, Impacts, resultFileName)
  • Handling of "File not Found" exception
  • The input file must contain three or more columns
  • From 2nd to last columns must contain numeric values only
  • The number of weights, number of impacts and number of columns (from 2nd to last columns) must be the same
  • Impacts must be either +ve or -ve
  • Impacts and weights must be separated by ',' (comma)

License

MIT

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_mehul_102317146-1.0.0.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

topsis_mehul_102317146-1.0.0-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for topsis_mehul_102317146-1.0.0.tar.gz
Algorithm Hash digest
SHA256 7a496c2c7dad5fa333c511e736bc7d97a7b7b6b93f019334a70c752f76818a9b
MD5 54052cdabdfd25af1cfa059a80db423f
BLAKE2b-256 2dce169f0d78f7ff3ee6ce2b25a4ad78042add058e811f5ecbca3bcfa15f0c7f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for topsis_mehul_102317146-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ef628a522877d7e04c790706ec9012d0b19c48d2d2f2f4ee1367b041ef5d092d
MD5 9fe1bedf6efab12d7a8ce0e67293b5b7
BLAKE2b-256 7f9dc646951d50d35649ba81294ebaaed980e6edcca7b1f7a804a9d5facec615

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