Skip to main content

A Python package for implementing TOPSIS

Project description

Here’s a clear and concise example of a README.md for your TOPSIS package:


Topsis-Ayush-102203119

A Python package for implementing the Technique for Order of Preference by Similarity to Ideal Solution (TOPSIS) method. This method is used for multi-criteria decision-making.


Installation

Install the package using pip:

pip install Topsis-Ayush-102203119

Usage

Command-Line Interface

After installation, you can use the topsis command to calculate rankings for your dataset.

Command Syntax

topsis <InputDataFile> <Weights> <Impacts> <ResultFileName>
  • <InputDataFile>: Path to the input CSV file.
  • <Weights>: Comma-separated list of weights for each criterion (e.g., 1,1,1,2).
  • <Impacts>: Comma-separated list of impacts for each criterion (+ for positive, - for negative).
  • <ResultFileName>: Path to save the output CSV file.

Input File Format

  • The input file must be a CSV with at least 3 columns.
  • The first column should contain the names of the objects (e.g., M1, M2, ...).
  • The remaining columns should contain numeric criteria values.

Example Input (data.csv):

Object,Criteria1,Criteria2,Criteria3,Criteria4
M1,250,16,12,5
M2,200,16,8,3
M3,300,32,16,4
M4,275,16,8,4
M5,225,32,16,2

Example Usage

  1. Prepare the input CSV file (e.g., data.csv).
  2. Run the following command:
topsis data.csv 1,1,1,2 +,+,-,+ result.csv
  1. The result will be saved in the specified output file (e.g., result.csv).

Example Output (result.csv):

Object,Criteria1,Criteria2,Criteria3,Criteria4,Topsis Score,Rank
M1,250,16,12,5,0.75,2
M2,200,16,8,3,0.45,4
M3,300,32,16,4,0.85,1
M4,275,16,8,4,0.55,3
M5,225,32,16,2,0.30,5

Requirements

This package requires the following Python libraries:

  • numpy
  • pandas

These dependencies are automatically installed with the package.


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_ayush_102203119-1.0.0.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

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

Topsis_Ayush_102203119-1.0.0-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

Details for the file topsis_ayush_102203119-1.0.0.tar.gz.

File metadata

  • Download URL: topsis_ayush_102203119-1.0.0.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.4

File hashes

Hashes for topsis_ayush_102203119-1.0.0.tar.gz
Algorithm Hash digest
SHA256 f35897e3cb0c29277eafa63a6345d20938a9a7effd9613d19587413f72a7d5b8
MD5 fa4598ac35e8e7136814715d047935b6
BLAKE2b-256 2b458f6f827763a011462aff9061eda403a8c427f99a6f96b3017b293bbc2728

See more details on using hashes here.

File details

Details for the file Topsis_Ayush_102203119-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for Topsis_Ayush_102203119-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2e02a5e101463b28c427a9515e57f0d3519ed7eae2917cb1ffdb9f5d225767e8
MD5 1a2d15c1b58a2f0806e4a9524dc6e0d0
BLAKE2b-256 223a3f143f58acbb94848bdf4b9121503d179b726b6327613b894f8aa6594278

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