Skip to main content

A package to find the topsis score

Project description

topsis-python

Topsis analysis of a csv file

""Project-1 Submission""

Name - Gursangat Singh

Roll no. - 101917025

About Topsis

The Technique for Order of Preference by Similarity to Ideal Solution (TOPSIS) is a multi-criteria decision analysis method, which was originally developed by Ching-Lai Hwang and Yoon in 1981 with further developments by Yoon in 1987, and Hwang, Lai and Liu in 1993. TOPSIS is based on the concept that the chosen alternative should have the shortest geometric distance from the positive ideal solution (PIS) and the longest geometric distance from the negative ideal solution (NIS).

Installation

pip install Topsis-Gursangat-101917025

Usage

>>> import pandas as pd
>>> from topsis_101917025 import topsiscalc as t
>>> raw=pd.DataFrame({"CR": ['M1', 'M2', 'M3', 'M4', 'M5'], "A": [250, 200, 300, 275, 225], "B": [16, 16, 32, 32, 16], "C": [12, 8, 16, 8, 16], "D": [5, 3, 4, 4, 2]})
>>> w=[0.25,0.25,0.25,0.25]
>>> i=['-','+','+','+']
>>> t.topsis(raw,w,i,'result.csv')

w1,w2,w3,w4 represent weights, and i1,i2,i3,i4 represent impacts where 1 is used for maximize and 0 for minimize. Size of w and i is equal to number of features.

Note that the first row and first column of dataset is dropped

Rank 1 signifies best decision

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. Please make sure to update tests as appropriate.

License

MIT

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-Gursangat-101917025-1.0.0.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_Gursangat_101917025-1.0.0-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

Details for the file Topsis-Gursangat-101917025-1.0.0.tar.gz.

File metadata

  • Download URL: Topsis-Gursangat-101917025-1.0.0.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.25.1 requests-toolbelt/0.9.1 urllib3/1.26.4 tqdm/4.59.0 importlib-metadata/3.10.0 keyring/22.3.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.8

File hashes

Hashes for Topsis-Gursangat-101917025-1.0.0.tar.gz
Algorithm Hash digest
SHA256 79c3eddf9113bc2305a49d86c64cb23a7f702b5736b5f83b777269c39761f7e2
MD5 d1bcc53a5f25fdb660abd718563aa52f
BLAKE2b-256 a35f61cf1deaacc54cb217cfd29f044cae7e003962151de0575e16d6833b6b5f

See more details on using hashes here.

File details

Details for the file Topsis_Gursangat_101917025-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: Topsis_Gursangat_101917025-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 4.4 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.25.1 requests-toolbelt/0.9.1 urllib3/1.26.4 tqdm/4.59.0 importlib-metadata/3.10.0 keyring/22.3.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.8

File hashes

Hashes for Topsis_Gursangat_101917025-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 88a0b5cb30239a6a5fff6cc525416c24dc1eb008de24f6026d1fd10c31386098
MD5 2b2e188593e5c2e638adf51199a9fdc9
BLAKE2b-256 439a212d45480317389269915603308e33be974f8303b64b04776e308d80d8ee

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