semvec/pypi-packages huggingface dataset:
topsis-Sarvagy-102003553 1.0.0
A Python package to find TOPSIS for multi-criteria decision analysis method
License: MIT
Keywords: UCS538,TIET

Project description
TOPSIS-ANALYSIS
By: Sarvagy Jain

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
```bash
pip install Topsis-SARVAGY-102003553    
```


### Usage

Arguments Required:
(Assumne we have 3 attributes in dataset.)

You have to required one .csv file. (102003553-data.csv)
Pass weights to each attribute. (e.g.: [1,1,1])
Pass impacts to each attribute. (e.g.: [+,-,+])
Pass the name of the file with you want to put on .csv file. (102003553-result.csv)


Enter csv filename followed by .csv extentsion, then enter the weights string with values separated by commas, followed by the impacts string with comma separated signs (+,-) and name of file followed by -.csv- extension in which the user wants the output file

## Example
#### sample.csv
```bash
Fund Name	P1	    P2	    P3	    P4	    P5
M1	        0.72	0.52	4.4	    66.6	18.06
M2	        0.71	0.5	    4.9	    48.4	13.63
M3      	0.82	0.67	6.1	    58.2	16.45
M4	        0.67	0.45	4.3	    48.9	13.58
M5	        0.75	0.56	3.3	    60.2	16.2
M6	        0.76	0.58	6.4	    33.3	10.26
M7	        0.85	0.72	3.2	    61.9	16.67
M8	        0.73	0.53	5.8	    36.5	10.89

```

### INPUT
```python
topsis 102003553-data.csv 1,1,1,1,1 +,+,-,+,+ 102003553-result.csv
```

### OUTPUT

```bash
Fund Name	P1	    P2	    P3	    P4	    P5	    Topsis Score	Rank
M1	        0.72	0.52	4.4	    66.6	18.06	0.607089574	    2
M2	        0.71	0.5	    4.9	    48.4	13.63	0.424434575	    6
M3	        0.82	0.67	6.1	    58.2	16.45	0.811786381	    1
M4	        0.67	0.45	4.3	    48.9	13.58	0.346716421	    8
M5	        0.75	0.56	3.3	    60.2	16.2	0.486990207	    4
M6	        0.76	0.58	6.4	    33.3	10.26	0.446021381	    5
M7	        0.85	0.72	3.2	    61.9	16.67	0.568789224	    3
M8	        0.73	0.53	5.8	    36.5	10.89	0.397353478	    7

```
Topsis-Mannat-102003288 1.0.0
A Python package implementing TOPSIS technique.
License: MIT

# TOPSIS-Python

**Project 1 : UCS654**

Submitted By: **Mannat Randhawa 102003288**

## What is TOPSIS

**T**echnique for **O**rder **P**reference by **S**imilarity to **I**deal
**S**olution (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](https://en.wikipedia.org/wiki/TOPSIS).

<br>

## How to use this package:

TOPSIS-Mannat-102003288 can be run as in the following example:

### In Command Prompt

```
>> topsis 102003288-data.csv "1,1,1,1,1" "+,+,-,+,+" 102003288-result.csv
```

## Sample dataset

The decision matrix (`a`) should be constructed with each row representing a Model alternative, and each column representing a criterion like Accuracy, R<sup>2</sup>, Root Mean Squared Error, Correlation, and many more.

| Model | Correlation | R<sup>2</sup> | RMSE | Accuracy |
| ----- | ----------- | ------------- | ---- | -------- |
| M1    | 0.79        | 0.62          | 1.25 | 60.89    |
| M2    | 0.66        | 0.44          | 2.89 | 63.07    |
| M3    | 0.56        | 0.31          | 1.57 | 62.87    |
| M4    | 0.82        | 0.67          | 2.68 | 70.19    |
| M5    | 0.75        | 0.56          | 1.3  | 80.39    |

Weights (`w`) is not already normalised will be normalised later in the code.

Information of benefit positive(+) or negative(-) impact criteria should be provided in `I`.

<br>

## Output

```
Model   Score    Rank
-----  --------  ----
  1    0.77221     2
  2    0.225599    5
  3    0.438897    4
  4    0.523878    3
  5    0.811389    1
```

<br>