Metadata-Version: 2.1
Name: topsis-vani-102303078
Version: 1.0.1
Summary: A Python package for TOPSIS (Technique for Order Preference by Similarity to Ideal Solution)
Home-page: https://github.com/vgalpha/Topsis-Vani-102303078
Author: Vani Goyal
Author-email: vgoyal_be23@thapar.edu
Project-URL: Bug Reports, https://github.com/vgalpha/Topsis-Vani-102303078/issues
Project-URL: Source, https://github.com/vgalpha/Topsis-Vani-102303078
Keywords: topsis mcdm decision-making multi-criteria optimization ranking
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Education
Classifier: Intended Audience :: Science/Research
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Scientific/Engineering :: Mathematics
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Operating System :: OS Independent
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pandas>=1.0.0
Requires-Dist: numpy>=1.18.0

# Topsis-Vani-102303078

[![PyPI version](https://badge.fury.io/py/Topsis-Vani-102303078.svg)](https://badge.fury.io/py/Topsis-Vani-102303078)
[![Python Version](https://img.shields.io/badge/python-3.7+-blue.svg)](https://www.python.org/downloads/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

A Python package implementing TOPSIS (Technique for Order Preference by Similarity to Ideal Solution) for multi-criteria decision making.

**Author:** Vani Goyal  
**Roll Number:** 102303078  
**Email:** vgoyal_be23@thapar.edu

## What is TOPSIS?

TOPSIS is a multi-criteria decision analysis method that identifies the best alternative by calculating the geometric distance from the ideal solution and the negative-ideal solution.

## Installation

```bash
pip install Topsis-Vani-102303078
```

## Usage

### Command Line Interface

```bash
topsis <InputDataFile> <Weights> <Impacts> <OutputFileName>
```

### Example

```bash
topsis test_data/data.csv "1,1,1,2" "+,+,-,+" test_data/result.csv
```

### Python Module

```python
from topsis_vani_102303078 import topsis

topsis('input.csv', '1,1,1,2', '+,+,-,+', 'output.csv')
```

## Input Format

CSV file with:
- **Column 1:** Alternative names/IDs
- **Columns 2-N:** Numeric criteria values

Example:
```csv
Fund Name,P1,P2,P3,P4,P5
M1,0.84,0.71,6.7,42.1,12.59
M2,0.91,0.83,7.0,31.7,10.11
```

## Parameters

### Weights
Comma-separated positive numbers (e.g., `"1,1,1,2"`)

### Impacts
Comma-separated `+` or `-` signs:
- `+` : Higher values are better (benefit criterion)
- `-` : Lower values are better (cost criterion)

Example: `"+,+,-,+"` means maximize P1, P2, P4 and minimize P3

## Output

CSV file with original data plus:
- **Topsis Score:** Performance score (0-100, higher is better)
- **Rank:** Final ranking (1 is best)

## Algorithm Steps

1. **Normalization:** Vector normalization of decision matrix
2. **Weighted Matrix:** Apply criterion weights  
3. **Ideal Solutions:** Identify best and worst solutions
4. **Distance Calculation:** Euclidean distances from ideals
5. **TOPSIS Score:** Closeness coefficient calculation
6. **Ranking:** Sort by TOPSIS score

## Requirements

- Python >= 3.7
- pandas >= 1.0.0
- numpy >= 1.18.0

## License

MIT License - see LICENSE file

## Links

- **GitHub:** https://github.com/vgalpha/Topsis-Vani-102303078
- **PyPI:** https://pypi.org/project/Topsis-Vani-102303078/

## Author

Vani Goyal  
Roll Number: 102303078  
Thapar Institute of Engineering & Technology  
Email: vgoyal_be23@thapar.edu
