Skip to main content

A python package for implementing TOPSIS

Project description

Topsis-Raj-102317090

A Python package to implement the Technique for Order of Preference by Similarity to Ideal Solution (TOPSIS).

TOPSIS is a multi-criteria decision analysis method that compares a set of alternatives based on a set of criteria. It identifies the alternative that is closest to the ideal best solution and farthest from the ideal worst solution.

Installation

You can install the package using pip:

pip install Topsis-Raj-102317090

Usage
This package can be used via the command line interface (CLI).

Command Syntax

topsis <InputDataFile> <Weights> <Impacts> <ResultFileName>

Parameters

InputDataFile: The path to the CSV file containing the data.

The first column must contain the object/variable names (e.g., M1, M2, M3).

From the 2nd column to the last, the file must contain numeric values only.

Weights: A comma-separated string of numbers representing the weights for each criterion (e.g., "1,1,1,2").

Impacts: A comma-separated string of + or - signs representing the impact of each criterion (e.g., "+,+,-,+").

+ implies a higher value is better (Profit).

- implies a lower value is better (Cost).

ResultFileName: The name of the output CSV file where the results (including TOPSIS Score and Rank) will be saved.

Example

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

Constraints:

The input file must contain three or more columns.

The number of weights, impacts, and numeric columns must be the same.

Impacts must be strictly either + or -.

Weights must be numeric and separated by commas.

License
This project is licensed under the MIT License.


### Reminder:
Since you are updating this, remember to change your version number in `setup.py` to **1.0.1** (or higher) before you run the build command again, otherwise PyPI will reject it.

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

Uploaded Source

Built Distribution

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

topsis_raj_102317090-1.0.1-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: topsis_raj_102317090-1.0.1.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for topsis_raj_102317090-1.0.1.tar.gz
Algorithm Hash digest
SHA256 612c4415be654ec64199c91b050eecd9f250de023b02e0b1c6dd6dc7cfc5a9ff
MD5 3d23df1f08b3b932910656cd6d23f851
BLAKE2b-256 ecc3276bffd99c88b29bba7e7090ff98bd9a8a46797666af47dd1587c06f569a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for topsis_raj_102317090-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1aa329cb431969ff74a296ee4a1128df19d53b71732cbeea7ca670d7a05c62ec
MD5 f86d389e38a469d88c0330c26c386295
BLAKE2b-256 cdeea829008a506d34384a5529954e09ccf473c18b8bb4a0f849f4a5154c0027

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