semvec/pypi-packages huggingface dataset:
Topsis-Kriti-102017079 1.4
A convenient python package for Topsis rank and score calculation for a given dataset, weights and impacts
License: MIT
Keywords: python,TOPSIS,MCDM,MCDA,statistics,prescriptive analytics,cli

# Topsis

## 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.

<br>

## How to install this package:

```
>> pip install Topsis-Kriti-102017079
```

### In Command Prompt

```
>> topsis data.csv "1,1,1,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 | Score  | Rank |
| ----- | ----------- | ------------- | ---- | -------- | ------ | ---- |
| M1    | 0.79        | 0.62          | 1.25 | 60.89    | 0.7722 | 2    |
| M2    | 0.66        | 0.44          | 2.89 | 63.07    | 0.2255 | 5    |
| M3    | 0.56        | 0.31          | 1.57 | 62.87    | 0.4388 | 4    |
| M4    | 0.82        | 0.67          | 2.68 | 70.19    | 0.5238 | 3    |
| M5    | 0.75        | 0.56          | 1.3  | 80.39    | 0.8113 | 1    |

<br>
The output file contains columns of input file along with two additional columns having Score and Rank
rest-api-payload 0.0.7
A to-go-to production API payload with an easy format for building APIs with Python.
License: MIT
Requires Python: >=3
Keywords: api,payload,custom api payload

# Production API Payload

A to-go-to production API payload with an easy format for building APIs with Python.

## Quickstart

To get it running, follow the steps below:

1). Pip install the package in your project terminal:

```bash
pip install rest-api-payload
```

2). In the file (.py) that you wish to use it, import it:

```python
    from rest_api_payload import success_response, error_response
```

That's pretty much it - you can now call the function and pass the required arguments!

## Example

Suppose you have a function that returns a response to the client:

```python
...
    def list_of_posts(request):
        """Returns a list of posts"""
        post = Post.objects.all()
        post_serializer = PostSerializer(post, many=True)
        return Response(post_serializer.data)
```

The above response output would be:

```json
    [
        {
            "title": "First blog post", 
            "content": "Lorem ipsume content", 
            "author": 1
        },
        {
            "title": "Second blog post", 
            "content": "Lorem ipsume content", 
            "author": 2
        },
        {
            "title": "Third blog post", 
            "content": "Lorem ipsume content", 
            "author": 3
        }
    ]
```

This works too, but let's take the function to the next level by doing this:

```python
...
from rest_api_payload import success_response


    def list_of_posts(request):
        """Returns a list of post"""
        post = Post.objects.all()
        post_serializer = PostSerializer(post, many=True)

        payload = success_response(
            status=True,
            message="Post retrieved!",
            data=post_serializer.data
        )
        return Response(data=payload, status=status.HTTP_200_OK)
```

The above response output would be:

```json
    [   "status": true, 
        "message":"Posts retrieved!", 
        "data": {
            {
                "title": "First blog post", 
                "content": "Lorem ipsume content", 
                "author": 1
            },
            {
                "title": "Second blog post", 
                "content": "Lorem ipsume content", 
                "author": 2
            },
            {
                "title": "Third blog post", 
                "content": "Lorem ipsume content", 
                "author": 3
            }
        }
    ]
```

*I built this payload because of a project I took lead in building from scratch - and literally had to sympathize with the frontend (web and mobile) engineers. I hope you find this package useful, kindly leave a star if you did.*

## Contribute

All contributions are welcome:

- Read the issues, Fork the project and do a Pull Request.
- Request a new topic creating a `New issue` with the `enhancement` tag.
- Find any kind of errors in the `README` and create a `New issue` with the details or fork the project and do a Pull Request.
- Suggest a better or more pythonic way for existing examples.
Topsis-Rishi-102017096 1.0.0.1
A Python package implementing TOPSIS technique.
License: MIT

# TOPSIS-Python

Submitted By: **Rishi Malik 102017096**

---

## What is TOPSIS?
Topsis 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
```
>> pip install Topsis-102017096-Rishi
```

## How to use this package:
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 (+,-) and lastly enter the name of the output file also with .csv extension where you want to store the result.

### In Command Prompt
Example
```
>> topsis data.csv "1,1,1,1" "+,+,-,+" output_file.csv
```
The rankings are displayed in the form of a table with the 1st rank offering us the best decision, and last rank offering the worst decision making, according to TOPSIS method.Output is also stored in the resultant csv file.

## Example
Sample Input
| Fund Name  | P1 | P2 | P3  | P4 | P5 |
| :----: |:--------------------:|:------------:|:------------:|:---------------:|:---------------:|
| M1 |0.65|	0.42|	5.3|	43.8|	12.54
|M2|0.94|	0.88	|4|	61.5|	16.83
|M3|	0.72|	0.52|	3.2|	69.7|	18.54
|M4	|0.89	|0.79	|5.4	|49	|14.02
|M5|	0.75|	0.56|	6.9|	49.4|	14.4
|M6	|0.6	|0.36	|4.2	|68.3	|18.37
|M7|	0.89|	0.79|	6.7|	44.6|	13.25
|M8	|0.79	|0.62	|3.8	|51.7	|14.23

weights vector = [ 1 , 1 , 1 , 1 , 1 ]
impacts vector = [ + , + , + , + , + ]

### Sample output data


Fund Name|P1|P2|P3|P4|P5|Topsis\_Score|Rank
-----|-----|-----|-----|-----|-----|-----|-----
M1|0.82|0.67|6.4|68.5|19.1|0.7484552561357947|2
M2|0.89|0.79|5.6|66.0|18.32|0.7866087836337962|1
M3|0.86|0.74|3.8|39.5|11.23|0.3427604044049379|7
M4|0.81|0.66|6.7|55.8|15.99|0.6504458146181358|3
M5|0.94|0.88|3.7|38.3|10.96|0.42910938170387014|5
M6|0.72|0.52|3.7|38.0|10.74|0.10560109314491806|8
M7|0.67|0.45|3.4|67.9|18.11|0.42237228179660335|6
M8|0.79|0.62|5.8|64.2|17.85|0.6437300671400316|4

## Please Note:
* Categorical values are not handled
* Enter the path for your input csv file
-Enter the weights vector with each weight separated by commas
-Enter the impact vector with each impact separated by commas
-Enter the name of csv file in which you want to store output dataframe.

## License
[MIT](https://choosealicense.com/licenses/mit/)