Metadata-Version: 2.4
Name: Topsis-Aartha-102302941
Version: 1.0.7
Author: Aartha Singh
Author-email: Aartha.tab@gmail.com
License: MIT
Project-URL: Source Repository, https://github.com/WorkaholicCat/TOPSIS-pyPackage
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy
Requires-Dist: pandas
Dynamic: author
Dynamic: author-email
Dynamic: description
Dynamic: description-content-type
Dynamic: license
Dynamic: license-file
Dynamic: project-url
Dynamic: requires-dist

# TOPSIS-Aartha-102302941

[![PyPI version](https://img.shields.io/pypi/v/Topsis-Aartha-102302941.svg)](https://pypi.org/project/Topsis-Aartha-102302941/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

A robust Python command-line utility to implement the **TOPSIS** (Technique for Order of Preference by Similarity to Ideal Solution) method.  
This tool helps in multi-criteria decision-making by ranking alternatives based on their geometric distance from the ideal best and worst solutions.

---

## 🛠️ Installation

Install the package directly from PyPI:

```bash
pip install Topsis-Aartha-102302941
```

---

## 💻 Usage

Run the package using:

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

### Parameters

- **InputDataFile** → Path to the `.csv` file  
- **Weights** → Comma-separated numeric values  
  Example: `"1,1,1,2"`  
- **Impacts** → Comma-separated signs (`+` or `-`)  
  Example: `"+,+,-,+"`  
- **ResultFileName** → Output `.csv` file name  

---

## 📌 Requirements

- Input file must contain **at least 3 columns**
- **Column 1** → Alternative names/IDs  
- **Column 2 onward** → Numeric criteria only  

---

## 📊 Example

### Input (`data.csv`)

| Alternative | P1  | P2 | P3 | P4 |
|-------------|-----|----|----|----|
| M1          | 250 | 16 | 12 | 5  |
| M2          | 200 | 16 | 8  | 3  |
| M3          | 300 | 32 | 16 | 4  |

### Command

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

### Output (`result.csv`)

The output file will include:
- Original data
- **Topsis Score**
- **Rank (1 = Best)**

---

## 🧠 Workflow

1. **Validation**
   - Checks column count, weights, impacts, and numeric data  

2. **Preprocessing**
   - Converts values to numeric  
   - Handles missing values using mean imputation  

3. **Normalization**
   - Uses Euclidean normalization  

4. **Ideal Solutions**
   - Determines:
     - **V⁺ (Best)**
     - **V⁻ (Worst)**  

5. **Closeness Score**
   - Computes distance from ideal best and worst  

6. **Ranking**
   - Assigns rank based on closeness score  

---

## 👤 Author

**Aartha Singh**  

- 🌐 Portfolio: https://myportfolio-phi-one-88.vercel.app/  
- 🐈 GitHub: https://github.com/WorkaholicCat  

---

## 📜 License

Distributed under the MIT License.  
See `LICENSE` for more information.

---
