semvec/pypi-packages huggingface dataset:
Topsis-Arjun-102017005 1.0.2
A Python package for Multiple Criteria Decision Analysis (MCDA) using TOPSIS Method made by Arjun Khanchandani.
Keywords: python,topsis,mcda

# topsis_arjun_102017005

## What is TOPSIS
Technique for Order Preference by Similarity to Ideal Solution (TOPSIS) originated in 1981 as a multi-criteria decision analysis method.<br> TOPSIS is based on the concept that the chosen alternative should have the shortest geometric distance from the positive ideal solution (PIS) and the longest geometric distance from the negative ideal solution (NIS).

## Installation

`pip install Topsis-Arjun-102017005`

## How to use it?

Command Prompt

> Topsis-Arjun-102017005 input.csv "1,1,1,1,1" "+,-,+,+,+" output.csv

Command Prompt<br>
```
Topsis-Arjun-102017005 <python_file> <Input Data File> <Weights> <Impacts> <Result File Name>
```
<br>

## Input csv format
Input file contain three or more columns<br>
First column is the variable/quantity name <br>
From 2nd to last columns contain numeric (int/float) values only

Example:<br>
```
topsis topsis.py inputfile.csv “1,1,1,1,2” “+,+,+,+,-” result.csv
```
<br><br>
<i>Note: The weights and impacts should be ',' seperated, input file should be in pwd.</i> 

## Sample input data
| Model       | P1 | P2 | P3 | P4 | P5 |
| ------------- |:-------------:| -----:|-----:|-----:|-----:|
| M1    | 0.62 | 0.38 | 3.8 | 33.8 | 9.65  | 
 | M2    | 0.75 | 0.56 | 5.7 | 50.3 | 14.33 | 
 | M3    | 0.95 | 0.90 | 6.5 | 65.6 | 18.49 | 
 | M4    | 0.61 | 0.37 | 6.2 | 43.6 | 12.70 | 
 | M5    | 0.60 | 0.36 | 6.4 | 61.2 | 17.14 | 
 | M6    | 0.76 | 0.58 | 5.3 | 68.0 | 18.66 | 
 | M7    | 0.66 | 0.44 | 6.2 | 47.2 | 13.63 | 
 | M8    | 0.80 | 0.64 | 5.7 | 37.1 | 11.06 | 

## Sample output data
| Model       | P1 | P2 | P3 | P4 | P5 | Performance Score | Topsis Rank |
| ------------- |:-------------:| -----:|-----:|-----:|-----:| ---: | ---: |
| M1    | 0.62 | 0.38 | 3.8 | 33.8 | 9.65  |  0.317272185       | 8           | 
| M2    | 0.75 | 0.56 | 5.7 | 50.3 | 14.33 |  0.452068871       | 4           | 
| M3    | 0.95 | 0.90 | 6.5 | 65.6 | 18.49 |  0.689037307       | 1           | 
| M4    | 0.61 | 0.37 | 6.2 | 43.6 | 12.70 |  0.340383903       | 7           | 
| M5    | 0.60 | 0.36 | 6.4 | 61.2 | 17.14 |  0.367206376       | 6           |
| M6    | 0.76 | 0.58 | 5.3 | 68.0 | 18.66 |  0.481350901       | 3           | 
| M7    | 0.66 | 0.44 | 6.2 | 47.2 | 13.63 |  0.372999972       | 5           | 
| M8    | 0.80 | 0.64 | 5.7 | 37.1 | 11.06 |  0.51226635        | 2           |
102183051-topsis 0.0.1
A Topsis Package
Requires Python: >=3.5
Keywords: python,video,stream,video stream,camera stream,sockets

# TOPSIS

Submitted By: **Sarthak Tiwari | 102183051**

***

## 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.

## How to install this package:
```bash
>> pip install -e .[dev]
```

## After installation, in Command Prompt/Terminal in pwd/current dir:
```
>> topsis <InputDataFile> <Weights> <Impacts> <ResultFileName>
```

Weights (`weights`) may not be normalised but will be normalised in the code.
**Note:** To avoid errors - 
Input file must contain three or more columns.
2nd to last columns must contain numeric values only.
Number of weights, number of impacts and number of columns (from 2 nd to last columns) must
be same.
Impacts must be either +ve or -ve.
Impacts and weights must be separated by â€˜,â€™ (comma).

## InputDataFile (data.csv) - an example

The decision matrix should be constructed with each row representing a Model alternative and each column representing a criterion like Correlation, R<sup>2</sup>, Root Mean Squared Error, Accuracy, etc. 

Model | Corr | Rseq | 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

## Output file (result.csv) - 
Based on the above input file and setting weights as "1,2,1,1" and impacts as "+,-,-,+".

Model | Corr | Rseq | RMSE | Accuracy | Topsis Score | Rank
------------ | ------------- | ------------ | ------------- | ------------ | ------------- | ------------- 
M1 |	0.79 | 0.62	| 1.25 | 60.89 | 0.423744391359611 | 4
M2 |  0.66 | 0.44	| 2.89 | 63.07 | 0.0.467426368298297 | 3
M3 |	0.56 | 0.31	| 1.57 | 62.87 | 0.760230957034903 | 1
M4 |	0.82 | 0.67	| 2.68 | 70.19 | 0.207772533881566 | 5
M5 |	0.75 | 0.56	| 1.3	 | 80.39 | 0.504864457803718 | 2

The output file contains columns of input file along with two additional columns having Topsis Score and Rank.