Skip to main content

It gives the ranking to models as per the TOPSIS score

Project description

TOPSIS PACKAGE - Assignment 1

I have developed a command line python program to implement the TOPSIS. TOPSIS (technique for order performance by similarity to ideal solution) is a useful technique in dealing with multi-attribute or multi-criteria decision making (MADM/MCDM) problems in the real world

Installation

pip install topsis-bhavya-102103345

Usage

Please provide the filename for the CSV, including the .csv extension. After that, enter the weights vector with values separated by commas. Following the weights vector, input the impacts vector, where each element is denoted by a plus (+) or minus (-) sign. Lastly, specify the output file name along with the .csv extension.

python [input_file_name.csv] [weight as string] [impact as string] [result_file_name.csv]

Example

Example

sample.csv

Model Name P1 P2 P3 P4 P5

M1 0.68 0.46 4 52.7 14.46

M2 0.61 0.37 6.9 51.5 14.85

M3 0.61 0.37 4.4 53.5 14.72

M4 0.7, 0.49 6 54.5 15.42

M5 0.65 0.42 4.1 68.7 18.47

M6 0.62 0.38 3.6 36.4 10.25

M7 0.92 0.85 5.2 44.6 12.89

M8 0.81 0.66 3.7 35.9 10.27

weights vector = [ 1,1,1,2,2 ]

impacts vector = [ +,+,-,+,+ ]

input

output

result.csv

Model Name,P1,P2,P3,P4,P5,Topsis Score,Rank

M1,0.68,0.46,4.0,52.7,14.46,0.5903064989592446,4.0

M2,0.61,0.37,6.9,51.5,14.85,0.5408709514358343,5.0

M3,0.61,0.37,4.4,53.5,14.72,0.5933191124418361,3.0

M4,0.7,0.49,6.0,54.5,15.42,0.4714313335411608,7.0

M5,0.65,0.42,4.1,68.7,18.47,0.3803866453639049,8.0

M6,0.62,0.38,3.6,36.4,10.25,0.9855303249104818,1.0

M7,0.92,0.85,5.2,44.6,12.89,0.5209148114910495,6.0

M8,0.81,0.66,3.7,35.9,10.27,0.7535236734320149,2.0

Other Notes

  1. The first column and first row are removed by the library before processing, in attempt to remove indices and headers. So make sure the csv follows the format as shown in sample.csv.

  2. Make sure the csv does not contain categorical values

License

© 2024 Bhavya Bhalla

This repository is licensed under the MIT license.

See LICENSE for details.

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-bhavya-102103345-1.0.0.tar.gz (4.5 kB view details)

Uploaded Source

Built Distributions

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

topsis_bhavya_102103345-1.0.0-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

topsis_bhavya_102103345-1.0-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

Details for the file topsis-bhavya-102103345-1.0.0.tar.gz.

File metadata

  • Download URL: topsis-bhavya-102103345-1.0.0.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for topsis-bhavya-102103345-1.0.0.tar.gz
Algorithm Hash digest
SHA256 2763bc8da97d35b3db7682593b8f7285e9d9f89441e03c0684e6592ae6c11202
MD5 cc8ebb920b00497678fe6784d84afd16
BLAKE2b-256 9572b31a8673595d5ffeac7dc1edacbbcf5fe80410d434d113d48b581c2eb5d4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for topsis_bhavya_102103345-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 068bfac971ffd165a8eb041e8f688368ad9392567439ddc41b2206288a4de50d
MD5 e204bc73400b46032c34a5cbe8cb9078
BLAKE2b-256 be2dae937e8d8f77b88e9fdd44c3094e3641522a5cc330c41e07bba897560663

See more details on using hashes here.

File details

Details for the file topsis_bhavya_102103345-1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for topsis_bhavya_102103345-1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 237d020c8871b981c78146ab783631317127e4a2d2b826f2907505a7cb900db3
MD5 fe5132629631aa93fc5b477808be3eb6
BLAKE2b-256 c55e9ffd58782a907cdff984fe83ca0682b2f05c403eff9f823dc534182ad9a6

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