TOPSIS implementation for Multi Criteria Decision Making (MCDM)
Project description
Topsis implementation for Multiple Criteria Decision Making (MCDM)
Topsis-Divyansh-102083048 is a Python Package that can be used as CLI tool to calculate TOPSIS performance score and ranking them according to score by taking csv file as input.
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.
Installation
Install the package using command-
pip install Topsis-Divyansh-102083048
How to use this package?
-
To use via CLI
topsis input_file weights impacts output_file
Arguments
Arguments Description input_file Input CSV file path weights Comma seperated numbers enclosed in "" impacts Comma seperated '+' or '-' enclosed in "" output_file Output CSV file path Output:
Creates a ouput_file that contains the original data with two new columns as performance score and rank.
Example:
topsis input_data.csv "1,1,1,2,1" "+,+,+,-,+" output_file.csv
-
To use in .py script
from Topsis-Divyansh-102083048 import topsis import pandas as pd dataset = pd.read_csv("data.csv") data = dataset[:,1:] weights = [1,1,1,2,1] impacts = ["+","+","+","-","+"] topsis(data,weights,impacts,output.csv)
Sample Input CSV
Fund Name P1 P2 P3 P4 P5 M1 0.65 0.42 4.2 60.1 16.34 M2 0.67 0.45 6.8 69.7 19.41 M3 0.91 0.83 6.5 62.9 17.79 M4 0.61 0.37 3.3 44.1 12.1 M5 0.8 0.64 5.5 55.4 15.59 M6 0.79 0.62 5.5 56.5 15.85 M7 0.82 0.67 5.1 53.6 15.05 M8 0.94 0.88 5.1 44.5 12.86 Sample Output CSV File
For weights "1,1,1,1,1" and impacts "+,-,+,-,+"
Fund Name P1 P2 P3 P4 P5 Topsis Score Rank M1 0.65 0.42 4.2 60.1 16.34 0.53475795 3 M2 0.67 0.45 6.8 69.7 19.41 0.64308057 1 M3 0.91 0.83 6.5 62.9 17.79 0.50063048 6 M4 0.61 0.37 3.3 44.1 12.1 0.50478334 5 M5 0.8 0.64 5.5 55.4 15.59 0.53326848 4 M6 0.79 0.62 5.5 56.5 15.85 0.5446234 2 M7 0.82 0.67 5.1 53.6 15.05 0.48796329 7 M8 0.94 0.88 5.1 44.5 12.86 0.4227203 8
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file Topsis-Divyansh-102083048-1.0.0.tar.gz.
File metadata
- Download URL: Topsis-Divyansh-102083048-1.0.0.tar.gz
- Upload date:
- Size: 4.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.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6d38ce13b6bfa392e0632fbc52405c36b58877cc4aee8044fcc88b63af6336ba
|
|
| MD5 |
a90eb7473c559f2ade2a5dd2872d4abf
|
|
| BLAKE2b-256 |
e4c0842d42d674cb2dcf89c5b72c87d209e4c1c46f2a6b97b75cdce51c10ca2f
|
File details
Details for the file Topsis_Divyansh_102083048-1.0.0-py3-none-any.whl.
File metadata
- Download URL: Topsis_Divyansh_102083048-1.0.0-py3-none-any.whl
- Upload date:
- Size: 5.4 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.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7fede2f67c21123cd878ef2b01c420e4907835bd1f34305c7121d46c3b535b31
|
|
| MD5 |
eab33401fea6a372ef26805b8e9291be
|
|
| BLAKE2b-256 |
0fbd6be506327b0383d4d51305ffad9e27ea3c5983758976b5ce444905b036bf
|