A Python pip package to apply topsis approach to rank the entries in a dataset
Project 1 : UCS633 DATA ANALYSIS AND VISUALIZATION
Submitted By: Yash Saxena 101703627
What is TOPSIS ?
Technique for Order Preference by Similarity to Ideal Solution (TOPSIS) originated in the 1980s as a multi-criteria decision making method. TOPSIS chooses the alternative of shortest Euclidean distance from the ideal solution, and greatest distance from the negative-ideal solution. More details at wikipedia.
How to use this package?
TOPSIS-YASH-SAXENA can be run as in the following example:
In Command Prompt
>> topsis data.csv "1,1,1,1" "+,+,-,+"
In Python IDLE:
>>> import pandas as pd >>> from topsis_python.topsis import topsis >>> dataset = pd.read_csv('data.csv').values >>> d = dataset[:,1:] >>> w = [1,1,1,1] >>> im = ["+" , "+" , "-" , "+" ] >>> topsis(d,w,im)
The decision matrix (
a) should be constructed with each row representing a Model alternative, and each column representing a criterion like Accuracy, R2, Root Mean Squared Error, Correlation, and many more.
w) is not already normalised will be normalised later in the code.
Information of benefit positive(+) or negative(-) impact criteria should be provided in
Model Score Rank ----- -------- ---- 1 0.77221 2 2 0.225599 5 3 0.438897 4 4 0.523878 3 5 0.811389 1
The rankings are displayed in the form of a table using a package 'tabulate', with the 1st rank offering us the best decision, and last rank offering the worst decision making, according to TOPSIS method.
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size topsis_yash_saxena-1.0.4-py3-none-any.whl (6.0 kB)||File type Wheel||Python version py3||Upload date||Hashes View hashes|
|Filename, size topsis-yash-saxena-1.0.4.tar.gz (4.2 kB)||File type Source||Python version None||Upload date||Hashes View hashes|
Hashes for topsis_yash_saxena-1.0.4-py3-none-any.whl