Skip to main content

topsis package for MCDM problems

Project description

Topsis-Harinderjit-102017151

for: Assignment-1 (UCS654) submitted by: Harinderjit Singh Roll no: 102017151 Group: 3CSE7

This is a Python library for solving Multiple Criteria Decision Making(MCDM) problems by using Topsis.

Installation

Install the package using :

pip install Topsis-Harinderjit-102017151==1.0.4

Usage

Enter csv filename followed by .csv extension, then enter the weights vector with vector values separated by commas, then enter the impacts vector with comma separated signs (+,-), followed by filename where result will be stored.

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

or vectors can be entered without " "

topsis sample.csv 1,1,1,1 +,-,+,+ output.csv

But the second representation does not provide for inadvertent spaces between vector values. So, if the input string contains spaces, make sure to enclose it between double quotes (" ").

Example

Consider this sample.csv file

First column of file is removed by model before processing so follow the following format.

All other columns of file should not contain any categorical values.

Model P1 P2 P3 P4 P5
M1 0.85 0.72 4.6 41.5 11.92
M2 0.66 0.44 6.6 49.4 14.28
M3 0.9 0.81 6.7 66.5 18.73
M4 0.8 0.64 6.9 69.7 19.51
M5 0.84 0.71 4.7 36.5 10.69
M6 0.91 0.83 3.6 42.3 11.91
M7 0.65 0.42 6.9 38.1 11.52
M8 0.71 0.5 3.5 60.9 16.4

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

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

input:

topsis sample.csv "1,2,1,2,1" "+,-,+,+,-" output.csv

output:

output.csv file will contain following data :

Model P1 P2 P3 P4 P5 Topsis score Rank
M1 0.85 0.72 4.6 41.5 11.92 0.3267076760116426 6
M2 0.66 0.44 6.6 49.4 14.28 0.6230956090525585 2
M3 0.9 0.81 6.7 66.5 18.73 0.5006083702087599 5
M4 0.8 0.64 6.9 69.7 19.51 0.6275096427934269 1
M5 0.84 0.71 4.7 36.5 10.69 0.3249142875298663 7
M6 0.91 0.83 3.6 42.3 11.91 0.2715902624653612 8
M7 0.65 0.42 6.9 38.1 11.52 0.5439263412940541 4
M8 0.71 0.5 3.5 60.9 16.4 0.6166791918077927 3

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-Harinderjit-102017151-1.0.4.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

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

Topsis_Harinderjit_102017151-1.0.4-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

Details for the file Topsis-Harinderjit-102017151-1.0.4.tar.gz.

File metadata

File hashes

Hashes for Topsis-Harinderjit-102017151-1.0.4.tar.gz
Algorithm Hash digest
SHA256 b621bdb4d4260cc253126e96c75827e60e8ea807def6fbc0834b648a3e2bbf46
MD5 b689f4e3f4159e9cf31f32b73482d74c
BLAKE2b-256 ce6e7b6d9b3e8cfff9b1d9d1f09f30ebc9b1c6e62553506f2290f6a62505dccd

See more details on using hashes here.

File details

Details for the file Topsis_Harinderjit_102017151-1.0.4-py3-none-any.whl.

File metadata

File hashes

Hashes for Topsis_Harinderjit_102017151-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 732b77a1996510a10b12f5b192329f14e60d8372766abe5f930e7e6124db0179
MD5 f7d4a42b6b2b1dc0f74f9c16e12cfbf5
BLAKE2b-256 bcdd781881a823c43211f71219d290c41ef7313dff4121b0880513034f7a559c

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