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.
🔗 Links & Download
- PyPI Project Page: https://pypi.org/project/Topsis-Aishani-102303250/
🛠️ 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
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_aishani_102303250-1.0.1.tar.gz.
File metadata
- Download URL: topsis_aishani_102303250-1.0.1.tar.gz
- Upload date:
- Size: 5.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
80589d0cf0a58663fe41fb1372b0052feb4089bc531289c4ca691d8167ac92e7
|
|
| MD5 |
0c581d1e1d0019de9fc36e254d480156
|
|
| BLAKE2b-256 |
81f844e7a5b238bae31142c00f9480582fc786f4f524540112d2cd27c457cdba
|
File details
Details for the file topsis_aishani_102303250-1.0.1-py3-none-any.whl.
File metadata
- Download URL: topsis_aishani_102303250-1.0.1-py3-none-any.whl
- Upload date:
- Size: 6.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 |
9f5945fb880471fbea4f973d1f064c59e5c2fc6436b944b9370f7ba07adaad8e
|
|
| MD5 |
47dbb0bcd53b872fceb281c91b7759ff
|
|
| BLAKE2b-256 |
029b306bc33c5223c9c307b399824c9ab4a3ecb91374bbaa1f7f9410aec33a62
|