Metadata-Version: 2.1
Name: topsis_aaryan_102103053
Version: 1.6
Summary: Library for dealing with Multiple Criteria Decision Making (MCDM) problems by applying Technique for Order of Preference by Similarity to Ideal Solution (TOPSIS).
Author: Aaryan Gupta
Author-email: aaryang991@gmail.com
License: MIT
Keywords: TOPSIS,MCDM
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Build Tools
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Description-Content-Type: text/markdown
License-File: LICENSE.txt
Requires-Dist: numpy
Requires-Dist: pandas

For: ***Assignment-1 (UCS654)*** 

Submitted by: ***Aaryan Gupta*** 

Roll No: ***102103053***

Group: ***3COE2***
# Topsis_Aaryan_102103053
Topsis_Aaryan_102103053 is a Python library for dealing with Multiple Criteria Decision Making (MCDM) problems by applying Technique for Order of Preference by Similarity to Ideal Solution (TOPSIS).
## Installation
Install Topsis_Aaryan_102103053 using Pypi via pip.
```sh
$ pip install topsis_aaryan_102103053
```
## Usage
You can use this package in python as :
```python
import topsis_aaryan_102103053 as top
inputDataFile = "sample.csv"
weights = "1,1,2,2,3"
impacts = "+,-,+,-,+"
resultFileName = "result.csv"
topsis(inputDataFile,weights,impacts,resultFileName)
```
###### OR
You can use this package via commandline as :
```sh
$ python topsis_aaryan_102103053 [InputDataFile as .csv] [Weights as a string] [Impacts as a string] [ResultFileName as .csv]
```
For Example :
```sh
$ python topsis_aaryan_102103053 sample.csv "1,1,2,2,3" "+,-,+,-,+" result.csv
```
##### *Please Note That :*
- The first column and first row are removed by the library before processing, in attempt to remove indices and headers. So the csv  MUST follow the format as shown in sample.csv shown in the **Example** section.
- The input data file MUST contain three or more columns.
- The second to last columns of the data file MUST contain **NUMERIC** values.
- The number of weights, impacts and columns *(second to last)* MUST be **SAME**.
- Impacts MUST either be '+' or '-'.
- Impacts and Weights MUST be separated by â€˜,â€™ (comma).

## Example
#### sample.csv
A csv file that contains data for mobile models and their features.
| Model | Price (in $) | Storage Space (in GB) | Camera (in MP) |  Looks (1 to 5) |
| :-: | :-: | :-: | :-: | :-: |
| M1 | 250 | 16 | 12 | 5 | 
| M2 | 200 | 16 | 8 | 3 |
| M3 | 300 | 32 | 16 | 4 |
| M4 | 275 | 32 | 8 | 4 |
| M5 | 225 | 16 | 16 | 2 |

Weights : 0.25,0.25,0.25,0.25

Impacts : -,+,+,+

#### input :
```cd
$ python topsis-aaryan-102103053 sample.csv "0.25,0.25,0.25,0.25" "-,+,+,+" result.csv
```
#### result.csv
A csv file that contains the same data as sample.csv with two additional columns 'Topsis Score' and 'Rank'.
| Model | Price (in $) | Storage Space (in GB) | Camera (in MP) |  Looks (1 to 5) | Topsis Score | Rank |
| :-: | :-: | :-: | :-: | :-: | :-: | :-: |
| M1 | 250 | 16 | 12 | 5 | 53.43 | 3 |
| M2 | 200 | 16 | 8 | 3 | 30.84 | 5 |
| M3 | 300 | 32 | 16 | 4 | 69.16 | 1 |
| M4 | 275 | 32 | 8 | 4 | 53.47 | 2 |
| M5 | 225 | 16 | 16 | 2 | 40.1 | 4 |

## License
MIT License

Copyright (c) 2024 Aaryan Gupta

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.
