Metadata-Version: 2.4
Name: Topsis-Paridhi-102303715
Version: 1.0.1
Summary: TOPSIS implementation as a Python package
Author: Paridhi Rastogi
Author-email: prastogi_be23@thapar.edu
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pandas
Requires-Dist: numpy
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: license-file
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# TOPSIS â€“ Python Package

## Project Description

**Topsis-Paridhi-102303715** is a Python package for solving **Multiple Criteria Decision Making (MCDM)** problems using the  
**Technique for Order Preference by Similarity to Ideal Solution (TOPSIS)**.

This package allows users to rank alternatives based on multiple criteria by providing:
- a CSV input file
- a weight vector
- an impact vector

The package computes the **TOPSIS score** and **rank** for each alternative.

---

## Installation

Use the package manager `pip` to install the package:

```bash
pip install Topsis-Paridhi-102303715
```

## Input Parameters
1. Weights Vector
A comma-separated list of numeric values representing the importance of each criterion.
Example:
0.25,0.25,0.25,0.25

2. Impacts Vector
A comma-separated list of impacts where:
+ indicates a beneficial criterion
- indicates a non-beneficial criterion

Example:
+,+,-,+

## Usage: 

```bash
topsis <input_file.csv> "<weights>" "<impacts>" <output_file.csv>
```
Example
topsis sample.csv "0.25,0.25,0.25,0.25" "+,+,-,+" output.csv

## Output
The output file is a CSV file containing:
- original input columns
- Topsis Score
- Rank

## Sample Output
TOPSIS RESULTS
| Item | Similarity Score | Rank |
|------|------------------|------|
| A    | 1.000000         | 1    |
| C    | 0.976532         | 2    |
| B    | 0.845210         | 3    |

Higher TOPSIS score indicates a better alternative.

## Input File Format:
Input file must be a CSV file:
- First column should contain alternative names
- Remaining columns must contain numeric values only
- File must contain at least 3 columns

Example sample.csv
| Item | Feature1 | Feature2 | Feature3 |
|------|----------|----------|----------|
| A    | 10       | 7        | 9        |
| B    | 8        | 6        | 5        |
| C    | 9        | 9        | 8        |

## Validation Rules:
The program performs the following validations:
- Input file existence check
- Minimum column count check
- Numeric value validation
- Equal number of weights, impacts, and criteria
- Impacts must be either + or -
- Weights and impacts must be comma-separated
- Appropriate error messages are displayed if invalid input is detected.

## License
This project is licensed under the MIT License.


