Skip to main content

Topsis in python that take input csv file and outputs csv file

Project description

TOPSIS. Submitted By: Prateek Rai.


Type: Package.

Title: TOPSIS method for multiple-criteria decision making (MCDM).

Version: 1.0.0.

Author: Prateek Rai.

Maintainer: Prateek Rai prateek11rai@gmail.com.


Description: Evaluation of alternatives based on multiple criteria using TOPSIS method.

What is TOPSIS? Technique for Order Preference by Similarity to Ideal Solution (TOPSIS) originated in the 1980s as a multi-criteria decision making method. TOPSIS chooses the alternative of shortest Euclidean distance from the ideal solution, and greatest distance from the negative-ideal solution.

How to install this package : pip install Topsis-Prateek-101916078

In Command Prompt : python topsis data.csv "1,1,1,1,1" "+,+,-,+,+" result.csv

Input file (data.csv) The decision matrix should be constructed with each row representing a Model alternative, and each column representing a criterion like Accuracy, R2, Root Mean Squared Error, Correlation, and many more. The file should be put in the command line as the location of the file.

| Fund Name | P1 | P2 | P3 | P4 | P5 | | M1 | 0.73 | 0.53 | 3.4 | 46 | 12.67 | | M2 | 0.72 | 0.52 | 4.1 | 35 | 10.09 | | M3 | 0.83 | 0.69 | 3.1 | 48.6 | 13.31 | | M4 | 0.85 | 0.72 | 4.3 | 59.8 | 16.42 | | M5 | 0.93 | 0.86 | 4.9 | 64.3 | 17.75 | | M6 | 0.73 | 0.53 | 4.7 | 44.1 | 12.52 | | M7 | 0.88 | 0.77 | 6.3 | 41.7 | 12.41 | | M8 | 0.8 | 0.64 | 4.8 | 67.4 | 18.41 |

Weights (weights) is not already normalised will be normalised later in the code.

Information of benefit positive(+) or negative(-) impact criteria should be provided in impacts.

Output file (result.csv)

| Fund Name | P1 | P2 | P3 | P4 | P5 | Topsis Score | Rank | | M1 | 0.73 | 0.53 | 3.4 | 46 | 12.67 | 0.5443557844202768 | 4 | | M2 | 0.72 | 0.52 | 4.1 | 35 | 10.09 | 0.4256480475457405 | 6 | | M3 | 0.83 | 0.69 | 3.1 | 48.6 | 13.31 | 0.7477966268745603 | 1 | | M4 | 0.85 | 0.72 | 4.3 | 59.8 | 16.42 | 0.6228391928555446 | 3 | | M5 | 0.93 | 0.86 | 4.9 | 64.3 | 17.75 | 0.6268025462066721 | 2 | | M6 | 0.73 | 0.53 | 4.7 | 44.1 | 12.52 | 0.3278090845190438 | 7 | | M7 | 0.88 | 0.77 | 6.3 | 41.7 | 12.41 | 0.3182486586359413 | 8 | | M8 | 0.8 | 0.64 | 4.8 | 67.4 | 18.41 | 0.47120452726540807 | 5 |

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

Topsis-Prateek-101916078-1.0.1.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

Topsis_Prateek_101916078-1.0.1-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

Details for the file Topsis-Prateek-101916078-1.0.1.tar.gz.

File metadata

  • Download URL: Topsis-Prateek-101916078-1.0.1.tar.gz
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2

File hashes

Hashes for Topsis-Prateek-101916078-1.0.1.tar.gz
Algorithm Hash digest
SHA256 736d2a67f3745c7f82f426a9e9b33455c72e0c6156d90b59e0778ada8bc74cff
MD5 86382abc595213da220ec9684d1fab0a
BLAKE2b-256 029a8067def467b1b3bd1055101043561ebf63e4b70ea721ba32aa81a461ae18

See more details on using hashes here.

File details

Details for the file Topsis_Prateek_101916078-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: Topsis_Prateek_101916078-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 5.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2

File hashes

Hashes for Topsis_Prateek_101916078-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7d0bdf8ff281d03eb454c87daa3f25dee0babf366f527c2eb4ed8b982da766b9
MD5 47d077f4aa57c2e653c43d33291a2f23
BLAKE2b-256 acc6b6c903e41e6ecfc23863825456470564ea9851ee183a66e00875e0bf8ed0

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