Skip to main content

This library gives function of save_topsis to give analysis...

Project description


Topsis Package by Gagandeep Singh 101803390



What is Topsis ?


It is a method of compensatory aggregation that compares a set of alternatives by identifying weights for each criterion, normalising scores for each criterion and calculating the geometric distance between each alternative and the ideal alternative, which is the best score in each criterion. An assumption of TOPSIS is that the criteria are monotonically increasing or decreasing. Normalisation is usually required as the parameters or criteria are often of incongruous dimensions in multi-criteria problems. Compensatory methods such as TOPSIS allow trade-offs between criteria, where a poor result in one criterion can be negated by a good result in another criterion. This provides a more realistic form of modelling than non-compensatory methods, which include or exclude alternative solutions based on hard cut-offs.



How to use my package


First of all you will have to import it by following command...

pip install TOPSIS_GAGANDEEP_SINGH_101803390

then import the package as follows :

import TOPSIS_GAGANDEEP_SINGH_101803390 as topsis

now we have to call save_topsis() function from this package to get results

topsis.save_topsis("book1.csv","0.1,0.4,0.3,0.2","+,+,-,+","output.csv")



Parameter of the save_topsis() function


This package gives the function save_topsis(input,weights,target,output) which takes four parameters:

  1. input : is the location of input file as example "./book1.csv"
  2. weight : this takes the input value of every parameter weights as example "0.1,0.2,0.3,0.4"
  3. target : this takes the +ve and -ve as input to take whether to maximize or minimize a parameter as example "+,+,-,+"
  4. output : is the location of the csv file where u want to save it as example "output.csv"

Input and output files must be csv
The length of weights and target and data columns in input file must be same


Sample input

Input file data...

Model corr Rseq RMSE Accuracy
M1 6 7 8 6
M2 8 7 8 7
M3 7 9 9 8
M4 9 6 8 9

output file data...

Model corr Rseq RMSE Accuracy Topsis Score Rank
M1 6 7 8 6 0.27 4
M2 8 7 8 7 0.4 3
M3 7 9 9 8 0.6 2
M4 9 6 8 9 0.67 1

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

File details

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

File metadata

  • Download URL: TOPSIS_GAGANDEEP_SINGH_101803390-1.2.3.tar.gz
  • Upload date:
  • Size: 3.9 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.3

File hashes

Hashes for TOPSIS_GAGANDEEP_SINGH_101803390-1.2.3.tar.gz
Algorithm Hash digest
SHA256 a0c1302d0d4148fd1699722e076ede5555de9b06a9ef1db3b268c6be5705fc63
MD5 f605c5ba0e71e3617693b847b8772b27
BLAKE2b-256 e3910be4f09e2d2288f879817ae61949f8eaf7149908794c72891e16e45ca37a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: TOPSIS_GAGANDEEP_SINGH_101803390-1.2.3-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.3

File hashes

Hashes for TOPSIS_GAGANDEEP_SINGH_101803390-1.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 5c2118cc250be256a5e988b5450ff6b5f4d149730ad8440c4b8d17ab9258eca1
MD5 71cae9d88938e4647746cb7de083261f
BLAKE2b-256 1ef586bce234f03e65cc0f0e15fcc35b68d6b52fc5b2a2c7c374313ddd00c6ce

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