Skip to main content

A Python package to calculate TOPSIS scores and rank models.

Project description

TOPSIS Package

A lightweight and easy-to-use Python package for the Technique for Order of Preference by Similarity to Ideal Solution (TOPSIS) method.

Introduction

TOPSIS is a multi-criteria decision analysis method, which is used to find the best alternative from a set of feasible alternatives. This package provides a command-line tool to perform TOPSIS analysis on a given dataset.

Installation

Install the package from PyPI using pip:

pip install Topsis-Aayushi-102103676

Usage

This package provides a command-line interface topsis that you can use directly from your terminal.

Syntax

topsis <input_file> <weights> <impacts> <result_file>

Arguments

  • <input_file>: The path to your input data file (must be a .csv or .xlsx file). The file must contain only numeric values, with the first column being the model name and the rest being the numeric criteria.
  • <weights>: A comma-separated string of weights for each criterion (e.g., "1,1,1,1").
  • <impacts>: A comma-separated string of impacts for each criterion, where + denotes a beneficial criterion and - denotes a non-beneficial (cost) criterion (e.g., "+,+,-,+").
  • <result_file>: The name of the output file (e.g., result.csv) where the results with TOPSIS scores and ranks will be saved.

Example

Suppose you have an input file data.csv:

Model Price Storage Camera Performance
M1 250 16 12 8
M2 200 16 8 7
M3 300 32 16 9
M4 275 32 8 8

To run the TOPSIS analysis on this data, you would use the following command:

topsis data.csv "1,1,1,1" "-,+,+,+" result.csv

This will generate a result.csv file with the TOPSIS scores and ranks for each model.

License

This project is licensed under the MIT License. See the LICENSE file for details.

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_aayushi_102103676-1.2.0.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

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

topsis_aayushi_102103676-1.2.0-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file topsis_aayushi_102103676-1.2.0.tar.gz.

File metadata

File hashes

Hashes for topsis_aayushi_102103676-1.2.0.tar.gz
Algorithm Hash digest
SHA256 28ae70f5cefa4e5cf71650a8d1e8490a1a332723e761fcaceb269674ab317af1
MD5 96f8e9520ae6867b4f82167c7a866b7b
BLAKE2b-256 8937e9f78cecf524684533568fd6f5bf0f20b2d58031fe36bb1943ab1056d8b7

See more details on using hashes here.

File details

Details for the file topsis_aayushi_102103676-1.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for topsis_aayushi_102103676-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 be2fc67304805f0697f143c08efc4f508072f6fab38d4163a9af5bb87c4efd4b
MD5 d8d033d0babccbaa36c9617cfa846b43
BLAKE2b-256 fa868f0b5a63e2e9e9a6b5469b4b9591bac544ef6d733b104add1acedb0a4834

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