Skip to main content

A simplified package to perform TOPSIS Analysis.

Project description

TOPSIS

TOPSIS is an acronym that stands for ‘Technique of Order Preference Similarity to the Ideal Solution’ and is a pretty straightforward MCDA method. As the name implies, the method is based on finding an ideal and an anti-ideal solution and comparing the distance of each one of the alternatives to those. It was presented in Hwang and Yoon (Multiple attribute decision making: methods and applications. Springer, Berlin, 1981) and Chen and Hwang (Fuzzy multiple attribute decision making methods. Springer, Berlin, 1992), and can be considered as one of the classical MCDA methods that has received a lot of attention from scholars and researchers.

Dependencies

• OS
• Pandas

Installation

pip install TOPSIS-Parth-101983047==0.0.4

Usage

perform_Topsis(source, weights, impacts, result)

Parameters

source : Input data file in .csv format
weights : List of weights for columns except first column
impacts : list of impacts for columns except first column
result : Output file name to store results in .csv format

Constraints / Exceptions handled

1. Correct number of parameters (source, weights, impacts, result)
2. Handling of “File not Found” exception
3. Input file must contain three or more columns.
4. From 2 nd to last columns must contain numeric values only (Handling of non-numeric values)
5. Number of weights, number of impacts and number of columns (from 2 nd to last columns) must
be same.
6. Impacts must be either +ve or -ve.
7. Impacts and weights must be separated by ‘,’ (comma).
8. Output "File already exists" condition

Example

'data.csv' in the same folder ---->

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

>>>python
>>>from Topsis.topsis import perform_Topsis
>>>perform_Topsis('data.csv', [1,2,1,2], [+,-,-,+], 'result.csv')

Generating output file ....
Output file generated.

'result.csv' generated in the same folder ---->
Model Corr Rseq RMSE Accuracy Topsis Score Rank
M1 0.79 0.62 1.25 60.89 0.404270981738897 4.0
M2 0.66 0.44 2.89 63.07 0.44542964404513863 3.0
M3 0.56 0.31 1.57 62.87 0.6966994505305135 1.0
M4 0.82 0.67 2.68 70.19 0.2312955403197052 5.0
M5 0.75 0.56 1.3 80.39 0.534754530220428 2.0

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-Parth-101983047-0.0.5.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_Parth_101983047-0.0.5-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file TOPSIS-Parth-101983047-0.0.5.tar.gz.

File metadata

  • Download URL: TOPSIS-Parth-101983047-0.0.5.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.2

File hashes

Hashes for TOPSIS-Parth-101983047-0.0.5.tar.gz
Algorithm Hash digest
SHA256 d862ad51ed0b022107aff134bef1d0109ae273dc139afbbc435f863c4712bc6b
MD5 d47582bf3277faa6b0665716c1cd191d
BLAKE2b-256 fcb35d75c333192ca1fc08e2f653d7669adc3298cb97771c8cf4e5a759db1226

See more details on using hashes here.

File details

Details for the file TOPSIS_Parth_101983047-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: TOPSIS_Parth_101983047-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 4.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.2

File hashes

Hashes for TOPSIS_Parth_101983047-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 aecc8524898e49ced79305f419d9b6f2565cb814a5d72a7a5f1dce979385d308
MD5 019257639d5eb1fc08ec21e7dcd1af6b
BLAKE2b-256 6d3cdf8008fa4434f7e70367b37fb0327fc47b9f743429649e88baedcd80a1de

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