Skip to main content

TOPSIS implementation

Project description

TOPSIS_Vipul_101803491

TOPSIS-Vipul-101803491 is an implementation of Technique of Order Preference Similarity to the Ideal Solution(TOPSIS). It will help you to place your data acc to preference that is by looking at the data and performing some Maths it will tell you the Preference in which you will be most benefitted. If you want to run the code from command line use the following format: python topsis.py Example: python topsis.py inputfile.csv “1,1,1,2” “+,+,-,+” result.csv

Remember!!!!

When you create the .py file (topsis.py in this case)

Just Import the package and call the function just_import_this_fxn_for_whole_topsis_result() by writing :-

import TOPSIS_Vipul_101803491

TOPSIS_Vipul_101803491.just_import_this_fxn_for_whole_topsis_result()

And you will see the desired result!!!

Now let's see the whole thing with the help of an example

Sample dataset The decision matrix (a) should be constructed with each row representing a Model alternative, and each column representing a criterion like Accuracy, Rseq, Root Mean Squared Error, Correlation, and many more.

Model Corr Rseq RMSE Accuracy
M1 0.79 0.62 1.25 60.89
M2 0.66 0.44 2.89 63.07
M3 0.56 0.31 1.57 62.87
M4 0.82 0.67 2.68 70.19
M5 0.75 0.56 1.3 80.39

Weights (w) is not already normalised will be normalised later in the code.

Information of benefit positive(+) or negative(-) impact criteria should be provided in I.

Result of our input dataset (or example)

Model Corr Rseq RMSE Accuracy TOPSIS SCORE RANK
M1 0.79 0.62 1.25 60.89 0.639133
M2 0.66 0.44 2.89 63.07 0.212592
M3 0.56 0.31 1.57 62.87 0.407846
M4 0.82 0.67 2.68 70.19 0.519153
M5 0.75 0.56 1.3 80.39 0.828267

The rankings are displayed in the form of a table using a package 'tabulate', with the 1st rank offering us the best decision, and last rank offering the worst decision making, according to TOPSIS method.

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_Vipul_101803491-1.2.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

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

TOPSIS_Vipul_101803491-1.2-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

Details for the file TOPSIS_Vipul_101803491-1.2.tar.gz.

File metadata

  • Download URL: TOPSIS_Vipul_101803491-1.2.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for TOPSIS_Vipul_101803491-1.2.tar.gz
Algorithm Hash digest
SHA256 8f8ebd85039c81f1eae553ad65d3f862e77ce337859afe056dbbb6a00c3cd79e
MD5 67de9de89b13e4100f43075883541e25
BLAKE2b-256 b6b280ee784f222df580e0ccbafdf0e622cc480255b5e8f653c49602849f73c3

See more details on using hashes here.

File details

Details for the file TOPSIS_Vipul_101803491-1.2-py3-none-any.whl.

File metadata

  • Download URL: TOPSIS_Vipul_101803491-1.2-py3-none-any.whl
  • Upload date:
  • Size: 5.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for TOPSIS_Vipul_101803491-1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 68a428ef6c9d02079886c2b8a60b3b29dcd429169ea5496e90a53e8e014a2664
MD5 b92b7149c82d359ff2dfdc11a49ac2ac
BLAKE2b-256 8878301442ba3875c9642c2f91c60d663be16a089226bcf2902598cd9a00face

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