Skip to main content

Topsis

Project description

TOPSIS Score Calculation

This project calculates the Technique for Order of Preference by Similarity to Ideal Solution (TOPSIS) score for a given dataset. TOPSIS is a multi-criteria decision-making method.

Requirements

  • Python 3.x
  • pandas
  • numpy

Install the required packages using pip:

pip install pandas numpy

Usage

To run the script, use the following command:

python3 main.py <input> <weights> <impacts> <output>

Parameters

  • input: Input CSV file containing the dataset.
  • weights: String of weights for each criterion, separated by commas.
  • impacts: String of impacts for each criterion (+ for beneficial, - for non-beneficial), separated by commas.
  • output: Output CSV file for saving the results.

Example

python3 main.py data.csv '2,1,1,1,1' '+,-,+,+,+' out.csv

Input Data Format

The input CSV file should have the following format:

Criteria1 Criteria2 Criteria3 Criteria4 Criteria5
Value1 Value2 Value3 Value4 Value5
... ... ... ... ...

Output

The output CSV file will contain the original data along with the calculated TOPSIS scores and rankings.

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_102217014-1.0.1.tar.gz (2.4 kB view details)

Uploaded Source

Built Distribution

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

topsis_102217014-1.0.1-py3-none-any.whl (2.6 kB view details)

Uploaded Python 3

File details

Details for the file topsis_102217014-1.0.1.tar.gz.

File metadata

  • Download URL: topsis_102217014-1.0.1.tar.gz
  • Upload date:
  • Size: 2.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.3

File hashes

Hashes for topsis_102217014-1.0.1.tar.gz
Algorithm Hash digest
SHA256 f7e35ca32291d9e44bd306f306f7895fa442b2ce8f86e962367be0dc4b2e1fe3
MD5 a333ea15546e02d87ee629e19d868bc1
BLAKE2b-256 0efad849bceb5a774212f9d502cebf6fa794ebf18afc329c26a2bb7295429f11

See more details on using hashes here.

File details

Details for the file topsis_102217014-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for topsis_102217014-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b39005391742de49512cdb62112c2a6a5623f67e227853da003cc1f57d2dfe45
MD5 0961a0d8ce91ec502c54c164fee01dee
BLAKE2b-256 aab0f104181b9bbadbd14f72b699fdefb34fe3f7a5848e8d69438dfed18235d1

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