Metadata-Version: 2.4
Name: Topsis-Yashika-102303439
Version: 1.0.0
Summary: A Python package for TOPSIS method
Author: Yashika
Author-email: yashikagarg1508@gmail.com
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pandas
Requires-Dist: numpy
Dynamic: author
Dynamic: author-email
Dynamic: description
Dynamic: description-content-type
Dynamic: license-file
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# TOPSIS Python Package

This Python package implements the **TOPSIS (Technique for Order Preference by Similarity to Ideal Solution)** method, which is a popular multi-criteria decision-making (MCDM) technique used to rank alternatives based on their distance from an ideal solution.

The package is designed as a **command-line tool** and validates all inputs as per the problem requirements.

---

## Features

- Command-line execution
- CSV file input
- Supports multiple criteria
- Handles weights and impacts
- Proper input validation and error handling
- Outputs TOPSIS score and rank
- Can be installed using `pip`

---

## Installation

After uploading the package to PyPI, install it using:

```bash
pip install Topsis-Yashika-102303439

Usage
- The program must be executed from the command line

Syntax
- python topsis.py <InputDataFile> <Weights> <Impact> <OutputResultFileName>
Example
- python topsis.py data.csv "1,1,1,1,1" "+,+,-,+,+" output-result.csv

Input File Format
- The input file must be in CSV format
- The file must contain three or more columns
- The first column should contain names/identifiers of alternatives
- From the second column onward, all values must be numeric

Sample Input
Fund Name,P1,P2,P3,P4,P5
M1,0.82,0.67,7,48.1,14.15
M2,0.83,0.69,3.3,50.7,13.88

Weights and Impacts
- Weights must be numeric
- Impacts must be either:
  - + for benefit criteria
  - - for cost criteria
- Weights and impacts must be comma-separated
- Number of weights = number of impacts = number of criteria


Output File
- Output is generated in CSV format
- Two new columns are added:
   - Topsis Score
   - Rank
- Higher TOPSIS score indicates a better alternative


Error Handling

- The program checks and handles the following errors:
- Incorrect number of command-line arguments
- Input file not found
- Less than three columns in input file
- Non-numeric values in criteria columns
- Mismatch between number of criteria, weights, and impacts
- Invalid impact symbols

Author
- Yashika
