Skip to main content

A Python package implementing TOPSIS technique.

Project description

TOPSIS-Python

Submitted By: Shikhar 101917064


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 use this package:

Install it by using command : pip install Topsis_Shikhar_101917064 After installing, Topsis_Shikhar_101917064 can be run as shown in the following example:

In Command Prompt

>> python
>> import pandas as pd
>> df = pd.read_csv("data.csv")
>> import Topsis_Shikhar_101917064
>> Topsis_Shikhar_101917064.topsis(df,"1,1,1,1","+,-,+,-") 

In Python IDLE:

>>> import pandas as pd
>>> from Topsis_Shikhar_101917064 import topsis
>>> df = pd.read_csv("data.csv")
>>> weight = "1,1,1,1"
>>> impact = "+,-,+,-"
>>> topsis(df,weight,impact)

Sample dataset

The decision matrix (a) 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.

Model Correlation R2 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

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


Output

Model   Score    Rank
-----  --------  ----
  1    0.772      2
  2    0.225      5
  3    0.438      4
  4    0.523      3
  5    0.811      1

The rankings are displayed in the form of a dataframe, with the 1st rank offering us the best decision, and last rank offering the worst decision making, according to TOPSIS method.

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_Shikhar_101917064-1.2.3.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

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

Topsis_Shikhar_101917064-1.2.3-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

Details for the file Topsis_Shikhar_101917064-1.2.3.tar.gz.

File metadata

  • Download URL: Topsis_Shikhar_101917064-1.2.3.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.26.0 requests-toolbelt/0.9.1 urllib3/1.26.7 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.7

File hashes

Hashes for Topsis_Shikhar_101917064-1.2.3.tar.gz
Algorithm Hash digest
SHA256 31e6b4efe0ea1d40f1dc06e32e713123ef323f83e9518bdf754f582175587a9a
MD5 3e6e1e4ed9b06b0572b491bc34113b4f
BLAKE2b-256 df73cf17e4c1190139a4770d4959da9b4d5f49690d2f1d0b63245091e810cc02

See more details on using hashes here.

File details

Details for the file Topsis_Shikhar_101917064-1.2.3-py3-none-any.whl.

File metadata

  • Download URL: Topsis_Shikhar_101917064-1.2.3-py3-none-any.whl
  • Upload date:
  • Size: 4.5 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.26.0 requests-toolbelt/0.9.1 urllib3/1.26.7 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.7

File hashes

Hashes for Topsis_Shikhar_101917064-1.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 49e61e214c388f22070801167ca8a5c9c253918a10a5f834a986c68406ecb89b
MD5 441a4eae4effd61345d99610aabbb929
BLAKE2b-256 6a64c6be6f4b627c689149fb90a15bc82900b05380f2bc7f70f63a7500ca2144

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