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 above input dataset

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

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.3.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.3-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: TOPSIS_Vipul_101803491-1.3.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.3.tar.gz
Algorithm Hash digest
SHA256 5735046ddc0e90c8383fc4f27ad444f521241d3e61b6e36ceec8eb70756924d6
MD5 a5197ed56267c7de0791a4d419c135b3
BLAKE2b-256 6968cd28a12ab73c88097d2534b2d5d8bb43a03af383cd1847db6439404ac1e6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: TOPSIS_Vipul_101803491-1.3-py3-none-any.whl
  • Upload date:
  • Size: 5.5 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 00d2af6fe5410d7d1d9acec98b7f2900245e362e40647ab32e715126d3b5c163
MD5 2d8d87bbaedac3e4aeab1ef294612489
BLAKE2b-256 865e80fbb8f405f1f7ce5a4b6799209cbffa2a6dd8e86d241b1633b76924e464

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