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

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: TOPSIS-Parth-101983047-0.0.7.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.7.tar.gz
Algorithm Hash digest
SHA256 96c02dac5868cc49d81d0bb0f9bbe854c90e7f9c542c6d0fc3b234644ecf8860
MD5 2d76f081cc1ed13c06d2a9298efc88b1
BLAKE2b-256 df480efb7c7d15c81932f8464eb40895a037b592ac98a089136b7e028bdc2f9e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: TOPSIS_Parth_101983047-0.0.7-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.7-py3-none-any.whl
Algorithm Hash digest
SHA256 834ef538237c8cb2aa408152b9251d0656e9cbcec0390331ac208761cc334dc7
MD5 ab78a60a75ab1e1573b24a55a929e781
BLAKE2b-256 b56550d0b407af786382853e80f4ff910592ef1301fae8363177baa7c909c65f

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