Skip to main content

A Python package to perform Topsis analysis.

Project description

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:

python YourRollNumber.py <InputDataFile> <Weights> <Impacts> <ResultFileName>

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file Topsis_PranavDevKhindria_102203279-0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for Topsis_PranavDevKhindria_102203279-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b85aabd0e2f90459d67b416dd9349a1ebd7e42707b49cbf4af473bc09b06ced9
MD5 99e7a7fceeb63a5fdbfe07b25c683e68
BLAKE2b-256 4c1d51e5c77a52bbab37b17afd8377c6e2b76375a04452727c726a4164548d11

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page