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=[1,1,1,1]
>>> 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.1.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.1-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: Topsis-Gursangat-101917025-1.0.1.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.1.tar.gz
Algorithm Hash digest
SHA256 41da0f1791fee116f321f7318bc9f6e2213e38707609cadd9613ea439be3b5bb
MD5 2138c213eeb247bbf4df32d8222b5ce7
BLAKE2b-256 f5eabfa29a961dc5f4892ac00f01d3b1cda93a423852a063c0ff0104aa667f16

See more details on using hashes here.

File details

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

File metadata

  • Download URL: Topsis_Gursangat_101917025-1.0.1-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.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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8c5740a017ce1ef61ddaaeb4114a2e1524998fe543d9b5111582973b59fa5b41
MD5 ba7a93251a5c912caac70c3d579491fd
BLAKE2b-256 6950b198759fc4ed44737bc392580e1ed6387fa6c7e5cb0268f4d0aa612cf4c5

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