topsis package for MCDM problems
Project description
topsis-3283
for: Project-1 (UCS633) submitted by: Katinder Kaur Roll no: 101703283 Group: 3COE13
topsis-3283 is a Python library for dealing with Multiple Criteria Decision Making(MCDM) problems by using Technique for Order of Preference by Similarity to Ideal Solution(TOPSIS).
Installation
Use the package manager pip to install topsis-3283.
pip install topsis-3283
Usage
Enter csv filename followed by .csv extentsion, then enter the weights vector with vector values separated by commas, followed by the impacts vector with comma separated signs (+,-)
topsis sample.csv "1,1,1,1" "+,-,+,+"
or vectors can be entered without " "
topsis sample.csv 1,1,1,1 +,-,+,+
But the second representation does not provide for inadvertent spaces between vector values. So, if the input string contains spaces, make sure to enclose it between double quotes (" ").
To view usage help, use
topsis /h
Example
sample.csv
A csv file showing data for different mobile handsets having varying features.
Model | Storage space(in gb) | Camera(in MP) | Price(in $) | Looks(out of 5) |
---|---|---|---|---|
M1 | 16 | 12 | 250 | 5 |
M2 | 16 | 8 | 200 | 3 |
M3 | 32 | 16 | 300 | 4 |
M4 | 32 | 8 | 275 | 4 |
M5 | 16 | 16 | 225 | 2 |
weights vector = [ 0.25 , 0.25 , 0.25 , 0.25 ]
impacts vector = [ + , + , - , + ]
input:
topsis sample.csv "0.25,0.25,0.25,0.25" "+,+,-,+"
output:
TOPSIS RESULTS
-----------------------------
P-Score Rank
1 0.534277 3
2 0.308368 5
3 0.691632 1
4 0.534737 2
5 0.401046 4
Other notes
- The first column and first row are removed by the library before processing, in attempt to remove indices and headers. So make sure the csv follows the format as shown in sample.csv.
- Make sure the csv does not contain categorical values
License
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
File details
Details for the file topsis-3283-1.1.1.tar.gz
.
File metadata
- Download URL: topsis-3283-1.1.1.tar.gz
- Upload date:
- Size: 3.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/45.0.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0344daa6d6fea4a97ebec86f23b4a043ec86d0bbe2792a7af9605472f897946e |
|
MD5 | e94f78f714bced9e23f3329f1684053b |
|
BLAKE2b-256 | e712add8445fa47ff5a91c90d5f2d0a84c848c0dfca4f614bef1214cbc898b7c |
File details
Details for the file topsis_3283-1.1.1-py3-none-any.whl
.
File metadata
- Download URL: topsis_3283-1.1.1-py3-none-any.whl
- Upload date:
- Size: 5.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/45.0.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f64363f35f0860e4c01ef96ea79ab12b847945b218d331eb87a5fec4999df727 |
|
MD5 | e50269b00988d01b949a90729a8fc500 |
|
BLAKE2b-256 | 981c19dbfc6c6308c5c9fe44ddcf47ad6999a0531c433cca08d9493182100eec |