semvec/pypi-packages huggingface dataset:
Topsis-FirstName-RollNumber 0.1
TOPSIS algorithm implementation

# Topsis-Ruhani-102203833

This package provides an implementation of the **TOPSIS** (Technique for Order of Preference by Similarity to Ideal Solution) algorithm. TOPSIS is a decision-making method that helps in ranking and selecting the best alternative based on a set of criteria. It evaluates the alternatives based on their relative distance to the ideal and worst-case solutions.

## What is TOPSIS?

**TOPSIS** is a popular method in Multi-Criteria Decision Analysis (MCDA) used for solving decision-making problems. The basic idea is to choose the alternative that is closest to the ideal solution and farthest from the worst solution. This method is widely used in various fields, such as operations research, business, and engineering.

### Steps Involved in TOPSIS:

1. **Construct the Decision Matrix**: Represent the alternatives and criteria in a matrix format.
2. **Normalize the Decision Matrix**: Normalize the data to make the units consistent.
3. **Apply Weights to the Criteria**: Each criterion is assigned a weight based on its importance.
4. **Determine the Ideal and Worst Alternatives**: Identify the best and worst values for each criterion.
5. **Calculate the Distance**: Calculate the Euclidean distance of each alternative from the ideal and worst alternatives.
6. **Calculate the TOPSIS Score**: Compute the score based on the ratio of the distance from the worst and the sum of the distances from both ideal and worst alternatives.
7. **Rank the Alternatives**: Rank the alternatives based on their TOPSIS score.

## Installation

To install the `Topsis-FirstName-RollNumber` package, follow these steps:

### Step 1: Install using pip

You can install the package directly from PyPI using `pip`:

```bash
pip install Topsis-FirstName-RollNumber
Topsis-PranavDevKhindria-102203279 0.1
A Python package to perform Topsis analysis.
Requires Python: >=3.6

# TOPSIS Command Line Program

A Python program to perform the **TOPSIS (Technique for Order Preference by Similarity to Ideal Solution)** analysis on a given dataset.

## Description

TOPSIS is a multi-criteria decision-making approach that ranks a set of alternatives based on their distance to the ideal best and ideal worst solutions. This program:

1. **Normalizes** the criteria values.
2. Applies **user-defined weights**.
3. Identifies the **ideal best (v+)** and **ideal worst (v-)** values.
4. Calculates the **Euclidean distance** of each alternative from these ideal solutions.
5. Computes the **TOPSIS score** (`dist_worst / (dist_best + dist_worst)`).
6. **Ranks** the alternatives (higher score â†’ better rank).

## Requirements

- **Python 3.x**
- **pandas** (Install via `pip install pandas`)
- **numpy** (Install via `pip install numpy`)

## File Structure

- **Script Name**: `YourRollNumber.py`  
  Replace `YourRollNumber` with your actual roll number (e.g., `101556.py`).

- **Input CSV File**: `<RollNumber>-data.csv`  
  - Must contain at least 3 columns.
  - The **first column** is the identifier (e.g., M1, M2, ...).
  - The **remaining columns** are numeric (no missing or non-numeric values).

- **Output CSV File**: `<RollNumber>-result.csv`  
  - Will contain the original columns plus two additional columns:  
    - **Topsis Score**  
    - **Rank**

## Usage

Open a terminal/command prompt in the directory containing your Python script and run:

```bash
python YourRollNumber.py <InputDataFile> <Weights> <Impacts> <ResultFileName>
```