Skip to main content

A Python package for implementing TOPSIS

Project description


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.2.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.2-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: topsis_ayush_102203119-1.0.2.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.2.tar.gz
Algorithm Hash digest
SHA256 a74b237e6baf950e03697ec962e125cd6e978082ab2145c745dd39aa83276270
MD5 52882a90d901c7f551bb222831f92d15
BLAKE2b-256 846415add61305bf5672332c5ee52f2e9a159ab29ec9db12b9f898b7e40481af

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for Topsis_Ayush_102203119-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 18dabc9e98fd3c9f522436a6b4298d24cb5c737e4a5339598f407e523ee06e29
MD5 1f86417d29bf46cd330037a90ad091f7
BLAKE2b-256 1319fba98592e91fc8b1298c87bff95d2a378ee159a42e398a4d1a57cf121726

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