Skip to main content

A Topsis Package

Project description

TOPSIS

Submitted By: Sarthak Tiwari | 102183051


What is TOPSIS?

Technique for Order Preference by Similarity to Ideal Solution (TOPSIS) originated in the 1980s as a multi-criteria decision making method.

How to install this package:

>> pip install -e .[dev]

After installation, in Command Prompt/Terminal in pwd/current dir:

>> topsis <InputDataFile> <Weights> <Impacts> <ResultFileName>

Weights (weights) may not be normalised but will be normalised in the code. Note: To avoid errors - Input file must contain three or more columns. 2nd to last columns must contain numeric values only. Number of weights, number of impacts and number of columns (from 2 nd to last columns) must be same. Impacts must be either +ve or -ve. Impacts and weights must be separated by ‘,’ (comma).

InputDataFile (data.csv) - an example

The decision matrix should be constructed with each row representing a Model alternative and each column representing a criterion like Correlation, R2, Root Mean Squared Error, Accuracy, etc.

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

Output file (result.csv) -

Based on the above input file and setting weights as "1,2,1,1" and impacts as "+,-,-,+".

Model Corr Rseq RMSE Accuracy Topsis Score Rank
M1 0.79 0.62 1.25 60.89 0.423744391359611 4
M2 0.66 0.44 2.89 63.07 0.0.467426368298297 3
M3 0.56 0.31 1.57 62.87 0.760230957034903 1
M4 0.82 0.67 2.68 70.19 0.207772533881566 5
M5 0.75 0.56 1.3 80.39 0.504864457803718 2

The output file contains columns of input file along with two additional columns having Topsis Score and Rank.

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

102183051-topsis-0.0.1.tar.gz (16.2 kB view details)

Uploaded Source

Built Distribution

102183051_topsis-0.0.1-py3-none-any.whl (15.1 kB view details)

Uploaded Python 3

File details

Details for the file 102183051-topsis-0.0.1.tar.gz.

File metadata

  • Download URL: 102183051-topsis-0.0.1.tar.gz
  • Upload date:
  • Size: 16.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.1

File hashes

Hashes for 102183051-topsis-0.0.1.tar.gz
Algorithm Hash digest
SHA256 91fe6005792b274ebe6c216e467c52a423ce3314ce6aae19d890ce58ca440ec2
MD5 010ae3f922bed782a67fe206db99f838
BLAKE2b-256 f518cc528da0a6f65592ca99a401676d905447f65ac54f0f22da587a5912e49e

See more details on using hashes here.

File details

Details for the file 102183051_topsis-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for 102183051_topsis-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 baac4f5f40a949a7fd59701eb344fc7f2b78eb53449c9a543a9d66f671eeece3
MD5 a9735c532438a59c7722a5e132589055
BLAKE2b-256 cf177957001a3a78172fc3eb39e8f062359586887341efeb4aa0511eba872baa

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