Skip to main content

topsis package for MCDM problems

Project description




Topsis-Sahil-102067006

| This library has been created as a part of the assignment for UCS654. This package implements Technique for Order of Preference by Similarity to Ideal Solution(TOPSIS) for solving Multiple Criteria Decision Making(MCDM) problems.

Installation

| This package can be installed using pip package manager

pip install Topsis-Sahil-102067006

Usage

| The library provides support for a 'topsis' command which can be invoked through the command line | Input Arguments:

  • file: a file with '.csv' extension, which should only have numeric values for all features, beyond the second column. This file should have minimum three columns, otherwise an error would occur

  • weights: A numeric array, with weights value for each feature column

  • impacts: A character array with '+' corresponding to features with positive impact and '-' corresponding to features with negative positive impact

  • output file name: name of the output csv file having TOPSIS score and rank columns appended to the input file

| Output: | The result table will be exported to a newly created csv file with given name

Example

| input.csv

Fund Name P1 P2 P3 P4 P5
M1 0.67 0.45 5.1 66.4 18.16
M2 0.8 0.64 4.9 46.7 13.26
M3 0.68 0.46 3.6 34.9 9.91
M4 0.84 0.71 4.7 36.8 10.76
M5 0.68 0.46 4.7 51.1 14.24
M6 0.63 0.4 5.3 54.5 15.21
M7 0.8 0.64 3.7 67.3 18.11
M8 0.79 0.62 3.3 66.6 17.83

| Weights = [1,1,1,1,1] | Impacts = ['+', '+', '+', '+', '-' ]

topsis input.csv 1,1,1,1,1 +,+,+,+,- output.csv

Output

| output.csv:

Fund Name P1 P2 P3 P4 P5 Topsis Score Rank
M1 0.67 0.45 5.1 66.4 18.16 0.484607532 5
M2 0.8 0.64 4.9 46.7 13.26 0.605914538 1
M3 0.68 0.46 3.6 34.9 9.91 0.396910752 8
M4 0.84 0.71 4.7 36.8 10.76 0.596374527 2
M5 0.68 0.46 4.7 51.1 14.24 0.44053701 7
M6 0.63 0.4 5.3 54.5 15.21 0.445909442 6
M7 0.8 0.64 3.7 67.3 18.11 0.537060234 3
M8 0.79 0.62 3.3 66.6 17.83 0.507571147 4

License

MIT License

Copyright (c) 2023 Sahil Singla

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

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-Sahil-102067006-1.0.0.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

Topsis_Sahil_102067006-1.0.0-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

Details for the file Topsis-Sahil-102067006-1.0.0.tar.gz.

File metadata

  • Download URL: Topsis-Sahil-102067006-1.0.0.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.0

File hashes

Hashes for Topsis-Sahil-102067006-1.0.0.tar.gz
Algorithm Hash digest
SHA256 31c6c62f6f0dc70c39bb1bf5ee251f33fb2061a67a3f09cb1777ab5e7de161f3
MD5 d77d653997b7bcdbc463860ebe8116e6
BLAKE2b-256 f4646a00f633037211bb229cc0f3bfcd47c7e069ea7e5169de90c3184f51f769

See more details on using hashes here.

File details

Details for the file Topsis_Sahil_102067006-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for Topsis_Sahil_102067006-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 abd5553100cf7a3db6fa3c030527debe9dc62e0e3ee9b6da1acc8eb7dad59ce6
MD5 250e8e80c9de1f7d3e0f1e277e4083f4
BLAKE2b-256 6d58f9eb9670fe860628a6958327ea2d760f76f557bc7023086befdc4d6a9647

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