Skip to main content

A Python package to perform Topsis analysis.

Project description

TOPSIS Command Line Program

Pranav Dev Khindria 102203279

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: main.py

  • Input CSV File: 102203279-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: 102203279-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 main.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 Distribution

topsis_pranavdevkhindria_102203279-0.2.0.tar.gz (5.4 kB view details)

Uploaded Source

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.2.0.tar.gz.

File metadata

File hashes

Hashes for topsis_pranavdevkhindria_102203279-0.2.0.tar.gz
Algorithm Hash digest
SHA256 3063e0c1205c1cc2a1291e5287282a3262547b13fcd87808060bf900c34e200d
MD5 21437440bf7e80ca4a8eee46d8e3ec72
BLAKE2b-256 692590333deb652324cb03513fb43e0320f2069dcc1e5c388261eb010d0ea251

See more details on using hashes here.

File details

Details for the file topsis_PranavDevKhindria_102203279-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for topsis_PranavDevKhindria_102203279-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e71eda77a4c148abfc4709d80d09a9466181f4108ddfb2c087ced4acefdf3d12
MD5 83fa817bd3f69f3dc4d502c6e77a94a5
BLAKE2b-256 da754f4df426da6edebdafb32f44018789b441997687de7ec5fd6e163479a8b6

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