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.6

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: TOPSIS-Parth-101983047-0.0.6.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.6.tar.gz
Algorithm Hash digest
SHA256 3e54185d4f9b9cd6ac4eaf16e2fbdeae0ecaf3792b2bf197048c0149bcbeceb8
MD5 2c5426396fec060bf796305025c7d1d8
BLAKE2b-256 73f25c891be1e77f98fa50b31828a6e01e2f80b6fbeeedb95ea46c62282e2e52

See more details on using hashes here.

File details

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

File metadata

  • Download URL: TOPSIS_Parth_101983047-0.0.6-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.6-py3-none-any.whl
Algorithm Hash digest
SHA256 9c545639fd16b317eb2b268aae7e3f0b19faf9a12e052f39b1086bef777e3503
MD5 02d2696a8ec4e76da7d6a21804001a2f
BLAKE2b-256 65cbf420394df11d26041fa03f58049e1cb30f4cdedda909cfbba5ea4987c235

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