Skip to main content

TOPSIS implementation (CLI)

Project description

TOPSIS Python Package (Assignment)

Package name on PyPI: Topsis-RohanMalhotra-102303437

What this package does

This package implements TOPSIS (Technique for Order Preference by Similarity to Ideal Solution) and provides a command-line interface.

Input format

Input must be a CSV with:

  • 1st column: Alternative name/ID (string)
  • 2nd to last columns: numeric criteria columns

Example:

Fund Name,P1,P2,P3,P4,P5
M1,0.67,0.45,6.5,4.2,16.58
M2,0.60,0.36,6.3,5.3,14.47

Install (after you upload to PyPI)

pip install Topsis-RohanMalhotra-102303437

Run from command line

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

Example:

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

Output

The output CSV will contain all input columns plus:

  • Topsis Score
  • Rank (1 = best)

Common errors (as required)

  • Wrong number of parameters
  • Input file not found
  • Less than 3 columns
  • Non-numeric values in criteria columns
  • Number of weights/impacts not equal to number of criteria
  • Impacts not in + or -
  • Weights/impacts not comma separated

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_rohanmalhotra_102303437-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.

File details

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

File metadata

File hashes

Hashes for topsis_rohanmalhotra_102303437-1.0.0.tar.gz
Algorithm Hash digest
SHA256 ad2f9c4616b3edb8be34833f738589d87b03491a8fd5db026e922860fd8d26cf
MD5 451afd939da505b4ec57db6561b90bba
BLAKE2b-256 469f9bac719cba88c284399dab1ae12b246e92a33aa8ec0502f98434c5ec85d2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for topsis_rohanmalhotra_102303437-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c74bd8de66b43d7c9cd5d08fcaf1b345d2d6ab44dea18592186e5fe9d31b73c9
MD5 333407a01d2c5df39681b23e626a6217
BLAKE2b-256 92da9ad86fd07bf14b7411efcd93c24097f5c3ca78277018f53e8422e1b06b81

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