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.csvor.xlsxfile). 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file topsis_aayushi_102103676-1.2.0.tar.gz.
File metadata
- Download URL: topsis_aayushi_102103676-1.2.0.tar.gz
- Upload date:
- Size: 4.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
28ae70f5cefa4e5cf71650a8d1e8490a1a332723e761fcaceb269674ab317af1
|
|
| MD5 |
96f8e9520ae6867b4f82167c7a866b7b
|
|
| BLAKE2b-256 |
8937e9f78cecf524684533568fd6f5bf0f20b2d58031fe36bb1943ab1056d8b7
|
File details
Details for the file topsis_aayushi_102103676-1.2.0-py3-none-any.whl.
File metadata
- Download URL: topsis_aayushi_102103676-1.2.0-py3-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
be2fc67304805f0697f143c08efc4f508072f6fab38d4163a9af5bb87c4efd4b
|
|
| MD5 |
d8d033d0babccbaa36c9617cfa846b43
|
|
| BLAKE2b-256 |
fa868f0b5a63e2e9e9a6b5469b4b9591bac544ef6d733b104add1acedb0a4834
|