semvec/pypi-packages huggingface dataset:
Topsis-Ananya-102283009 1.0.0
Performs TOPSIS
License: MIT

## Project description

# Topsis

for: *Project-1 (UCS633)* submitted by: *Ananya Gupta* Roll no: 102283009 Group: *3COE16*

Topsis-Ananya-102283009 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.

```pip install Topsis-Ananya-102283009```

## 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 (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


[MIT](https://choosealicense.com/licenses/mit/)
TOPSIS-SuvidhaSrivastava-102103019 0.1.0
Python package for implementing TOPSIS technique.
License: MIT

# TOPSIS


Submitted By: Suvidha Srivastava

***

## What is TOPSIS?

The Technique for Order Preference by Similarity to Ideal Solution (TOPSIS) emerged
in the 1980s as a method for making decisions involving multiple criteria. TOPSIS
selects an alternative based on its proximity to the ideal solution, measured by the 
shortest Euclidean distance, and its distance from the negative-ideal solution, 
measured by the greatest distance.
<br>

## How to install this package:
```
>> pip install TOPSIS-SuvidhaSrivastava-102103019
```


### In Command Prompt
```
>> topsis data.csv "1,1,2,1" "+,+,-,+" result.csv
```

## Input file (data.csv)

The decision matrix 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 (`weights`) is not already normalised will be normalised later in the code.

Information of benefit positive(+) or negative(-) impact criteria should be provided in `impacts`.

<br>

## Output file (result.csv)


Model | Correlation | R<sup>2</sup> | RMSE | Accuracy | Topsis_score | Rank
------------ | ------------- | ------------ | ------------- | ------------ | ------------- | ------------- 
M1 |	0.79 | 0.62	| 1.25 | 60.89 | 0.849592 | 2
M2 |  0.66 | 0.44	| 2.89 | 63.07 | 0.143187 | 5
M3 |	0.56 | 0.31	| 1.57 | 62.87 | 0.597633 | 3
M4 |	0.82 | 0.67	| 2.68 | 70.19 | 0.364575 | 4
M5 |	0.75 | 0.56	| 1.3	 | 80.39 | 0.877204 | 1

<br>
The output file contains columns of input file along with two additional columns having **Topsis_score** and **Rank**