Skip to main content

A Python package to implement TOPSIS.

Project description

TOPSIS

Submitted By: Purnima Lal | 101803523


What is TOPSIS?

Technique for Order Preference by Similarity to Ideal Solution (TOPSIS) originated in the 1980s as a multi-criteria decision making method.

How to install this package:

>> pip install TOPSIS-Purnima-101803523

After installation, in Command Prompt/Terminal in pwd/current dir:

>> topsis <InputDataFile> <Weights> <Impacts> <ResultFileName>

Weights (weights) may not be normalised but will be normalised in the code. Note: To avoid errors - Input file must contain three or more columns. 2nd to last columns must contain numeric values only. Number of weights, number of impacts and number of columns (from 2 nd to last columns) must be same. Impacts must be either +ve or -ve. Impacts and weights must be separated by ‘,’ (comma).

InputDataFile (data.csv) - an example

The decision matrix should be constructed with each row representing a Model alternative and each column representing a criterion like Correlation, R2, Root Mean Squared Error, Accuracy, etc.

Model Corr Rseq 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

Output file (result.csv) -

Based on the above input file and setting weights as "1,2,1,1" and impacts as "+,-,-,+".

Model Corr Rseq RMSE Accuracy Topsis Score Rank
M1 0.79 0.62 1.25 60.89 0.423744391359611 4
M2 0.66 0.44 2.89 63.07 0.0.467426368298297 3
M3 0.56 0.31 1.57 62.87 0.760230957034903 1
M4 0.82 0.67 2.68 70.19 0.207772533881566 5
M5 0.75 0.56 1.3 80.39 0.504864457803718 2

The output file contains columns of input file along with two additional columns having Topsis Score and Rank.

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-Purnima-101803523-1.0.2.tar.gz (3.4 kB view details)

Uploaded Source

File details

Details for the file TOPSIS-Purnima-101803523-1.0.2.tar.gz.

File metadata

  • Download URL: TOPSIS-Purnima-101803523-1.0.2.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/49.6.0.post20200925 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.3

File hashes

Hashes for TOPSIS-Purnima-101803523-1.0.2.tar.gz
Algorithm Hash digest
SHA256 f07a52291c2ed699b9126a7885f0581d362dedd0328f5537329c73192d9c7ba8
MD5 270c9f5457c44e8bcd38ca0b4e459435
BLAKE2b-256 e33ad08b846f1682ebe9f6f75bd1efc0ec703b82e550f6e4f641e3be7ae94afc

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