Metadata-Version: 2.4
Name: Topsis-Rhumeet-102317171
Version: 1.0.0
Summary: A command-line Python package to implement the TOPSIS method.
Home-page: https://github.com/Rhumeet-Bhatia/Topsis_Assignment_1
Author: Rhumeet Bhatia
Author-email: rbhatia_be23@thapar.edu
License: MIT
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Education
Requires-Python: >=3.6
Description-Content-Type: text/markdown
Requires-Dist: pandas
Requires-Dist: numpy
Requires-Dist: openpyxl
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: license
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

## Topsis-Rhumeet-102317171

A Python package implementing the Technique for Order of Preference by Similarity to Ideal Solution (TOPSIS) for Multi-Criteria Decision Making (MCDM).
This package works as a **Command Line Tool** and generates an output CSV file containing the **TOPSIS Score** and **Rank**.

## Installation

Install the package from PyPI using:

```bash
pip install Topsis-Rhumeet-102317171
```

## Quick Start

### Command Syntax
Once installed, you can use the `topsis` command directly from your terminal, following the syntax given below.

```bash
topsis <InputDataFile> <Weights> <Impacts> <ResultFileName>
```
### Parameters
The command accepts exactly 4 parameters:
| Parameter   | Format                 | Example       | Description                     |
|------------|-------------------------|--------------|---------------------------------|
| Input file | Path string             | `"data.csv"` | Path to your CSV file           |
| Weights    | Comma-separated string  | `"1,1,1,1"`  | Weight for each criterion       |
| Impacts    | Comma-separated string  | `"+,+,-,+"`  | `+` for benefit, `-` for cost   |
| Output file| Path string             | `"result.csv"` | Where to save results         |

### Example Execution
Grab an input csv or excel file strictly adheres to the following structure:
1. The file must have at least 3 columns- Candidate Identifier column followed by min. 2 criteria.
2. The first column must contain the names/IDs of the alternatives.
3. Criteria columns must contain only numeric values.

A sample dataset file (`data1.csv`) is shown below:

| Model | Corr | Rseq | 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.30 | 80.39 |

Run the following command through the terminal.
```bash
topsis data1.csv "1,1,1,1" "+,+,-,+" result1.csv
```

The output file (`result1.csv`) generated will look like this:
| Model | Corr | Rseq | RMSE | Accuracy | Topsis Score | Rank |
| ----- | ---- | ---- | ---- | -------- | ------------ | ---- |
| M1    | 0.79 | 0.62 | 1.25 | 60.89    | 0.7722       | 2    |
| M2    | 0.66 | 0.44 | 2.89 | 63.07    | 0.2256       | 5    |
| M3    | 0.56 | 0.31 | 1.57 | 62.87    | 0.4389       | 4    |
| M4    | 0.82 | 0.67 | 2.68 | 70.19    | 0.5239       | 3    |
| M5    | 0.75 | 0.56 | 1.30 | 80.39    | 0.8114       | 1    |

Sample input and output files are available in the `sample_data/` folder.

## Important Notes

- The command accepts exactly four parameters.
- Number of weights and impacts must match number of criteria columns.
- Impacts must be only `+` or `-`.
- Make sure the criteria columns must be numeric as mentioned earlier.
- No cell should be empty.
