Skip to main content

A Python package for TOPSIS implementation

Project description

TOPSIS Command Line Tool

📊 Topsis-Aishani-102303250 is a package that provides a command-line implementation of the TOPSIS (Technique for Order Preference by Similarity to Ideal Solution) method for multi-criteria decision making.

Python PyPI License

🔗 Links & Download


🛠️ Installation

Use the package manager pip to install this package directly from your terminal.

pip install Topsis-Aishani-102303250

Usage

You can use this package via the command line.
The input file must be a CSV file containing numeric data or categorical data.


Command Syntax

topsis <InputDataFile> <Weights> <Impacts> <OutputResultFileName>

Arguments

Argument Description
InputDataFile Path to the input CSV file
Weights Comma-separated numerical weights (e.g., 1,1,1,2)
Impacts Comma-separated signs (+ or -) (e.g., +,+,-,+)
OutputResultFileName Name of the output CSV file

Note:
If weights or impacts contain spaces, enclose them in double quotes.
Example: "1, 1, 1, 2"


📝 Example

Sample Input (data.csv)

Model Storage Camera Price Looks
M1 16 12 250 5
M2 16 8 200 3
M3 32 16 300 4
M4 32 8 275 4
M5 16 16 225 2

Execution

Run the following command in your terminal:

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

Output (result.csv)

The output file contains the original data along with two additional columns:

  • Topsis Score
  • Rank
Model Storage Camera Price Looks Topsis Score Rank
M1 16 12 250 5 0.53428 3
M2 16 8 200 3 0.30837 5
M3 32 16 300 4 0.69163 1
M4 32 8 275 4 0.53474 2
M5 16 16 225 2 0.40105 4

✅ Constraints & Validations

  • Input file must be a valid CSV.
  • Input file must contain at least three columns.
  • The first column is assumed to be the object/alternative name and is excluded from calculations.
  • All columns from the second column onward must be numeric.
  • Number of weights must match the number of feature columns.
  • Number of impacts must match the number of feature columns.
  • Impacts must be either:
    • + → Positive impact
    • - → Negative impact

📈 Interpretation

  • A higher TOPSIS score indicates a better alternative.
  • Rank 1 represents the most preferred option based on given weights and impacts.

📜 License

This project is licensed under the MIT License.

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

Uploaded Source

Built Distribution

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

topsis_aishani_102303250-1.0.1-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for topsis_aishani_102303250-1.0.1.tar.gz
Algorithm Hash digest
SHA256 80589d0cf0a58663fe41fb1372b0052feb4089bc531289c4ca691d8167ac92e7
MD5 0c581d1e1d0019de9fc36e254d480156
BLAKE2b-256 81f844e7a5b238bae31142c00f9480582fc786f4f524540112d2cd27c457cdba

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for topsis_aishani_102303250-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9f5945fb880471fbea4f973d1f064c59e5c2fc6436b944b9370f7ba07adaad8e
MD5 47dbb0bcd53b872fceb281c91b7759ff
BLAKE2b-256 029b306bc33c5223c9c307b399824c9ab4a3ecb91374bbaa1f7f9410aec33a62

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