Skip to main content

topsis package for MCDM problems

Project description

TOPSIS-NANDITA-101917191

submitted by: Nandita Roll no: 101917191 Group: 3CSE8

TOPSIS-NANDITA-101917191 is a Python library for dealing with Multiple Criteria Decision Making(MCDM) problems by using Technique for Order of Preference by Similarity to Ideal Solution(TOPSIS).

Installation

Use the package manager pip to install TOPSIS-NANDITA-101917191.

pip install TOPSIS-NANDITA-101917191

Usage

Enter csv filename followed by .csv extentsion, then enter the weights vector with vector values separated by commas, followed by the impacts vector with comma separated signs (+,-)

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 (" ").

To view usage help, use

topsis /h

Example

sample.csv

A csv file showing data for different mobile handsets having varying features.

Model Storage space(in gb) Camera(in MP) Price(in $) Looks(out of 5)
M1 16 12 250 5
M2 16 8 200 3
M3 32 16 300 4
M4 32 8 275 4
M5 16 16 225 2

weights vector = [ 0.25 , 0.25 , 0.25 , 0.25 ]

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

input:

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

output:

output.csv

TOPSIS RESULTS (P-Score, Rank) are appended to the input csv and saved

Model Storage space(in gb) Camera(in MP) Price(in $) Looks(out of 5) P-Score Rank
M1 16 12 250 5 0.534277 3
M2 16 8 200 3 0.308368 5
M3 32 16 300 4 0.691632 1
M4 32 8 275 4 0.534737 2
M5 16 16 225 2 0.401046 4

Other notes

  • 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.
  • Make sure the csv does not contain categorical values

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-NANDITA-101917191-3.0.tar.gz (4.2 kB view details)

Uploaded Source

File details

Details for the file TOPSIS-NANDITA-101917191-3.0.tar.gz.

File metadata

  • Download URL: TOPSIS-NANDITA-101917191-3.0.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.3 CPython/3.8.3

File hashes

Hashes for TOPSIS-NANDITA-101917191-3.0.tar.gz
Algorithm Hash digest
SHA256 c657e5470a250124a777a37ed3b60d787cc01db21546b815bc2100e104759cba
MD5 04641823b809cab7e80cbbc1ea76ad05
BLAKE2b-256 eb3b2910216484fdad4156965cfed960df78be0c0b4f404cf0989fe98b059c45

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page