Skip to main content

Python package implementing TOPSIS for MCDM problems

Project description

topsis-saksham-102303892

Description

topsis-saksham-102303892 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-saksham-102303892.

pip install topsis-saksham-102303892

Usage

Enter csv filename followed by .csv extension, 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" "+,-,+,+"

or vectors can be entered without " "

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

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:

      TOPSIS RESULTS
-----------------------------

    P-Score  Rank
1  0.534277     3
2  0.308368     5
3  0.691632     1
4  0.534737     2
5  0.401046     4

The output is also saved to a file named output-result.csv.

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.
  • Input file must have at least 3 columns.
  • All columns except the first must contain numeric values only.
  • Number of weights must equal the number of criteria (columns - 1).
  • Number of impacts must equal the number of criteria.
  • Impacts must be either + or -.

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

Uploaded Source

Built Distribution

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

topsis_saksham_102303892-1.0.0-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for topsis_saksham_102303892-1.0.0.tar.gz
Algorithm Hash digest
SHA256 19505efb1637ae4c0f4895e8c4011a0ec6be4792e269f96af6387fc3df91c268
MD5 3c989dbcad65f7f876ded6f4c7c7b456
BLAKE2b-256 7594c0347bafddcc9e9665b471a4c3cdc08c5394df8a79899e95e078ee895c83

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for topsis_saksham_102303892-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5897e77afc6dd4e7ca56e24856a872dd064545cf1c39a95a7cf7aafb1cb6ad6c
MD5 242a2a74ea8613e0772fef7aad873461
BLAKE2b-256 a0f65202b9ace122b5741d2b13ea8ce6c291ab6847392d5c83c0f72f7f4eccbb

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