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.1.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.1.3.tar.gz.

File metadata

  • Download URL: TOPSIS_GAGANDEEP_SINGH_101803390-1.1.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.1.3.tar.gz
Algorithm Hash digest
SHA256 87f395aab3e343886a2c72dc29c8a8fbede134118c5688a1316934cdb1125abb
MD5 dce179f2f95e812ebff37754ac12193d
BLAKE2b-256 a5f46245e673f3ae1f70fca93da75a6def9b2931cf7b816e5b29e4f4dae0191f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: TOPSIS_GAGANDEEP_SINGH_101803390-1.1.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.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 0a6163076f0a8f7940924c1e164462288f93e68768042b3d42e5cdb3d6ddffbf
MD5 105fdcb0b89324e1bf59662018bfbaa5
BLAKE2b-256 d9bab6c69ca75582c8c87e93b249745035920670d090591258af43fc55a869c8

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