102203525_TOPSIS
102203525_TOPSIS is a Python package that implements the TOPSIS (Technique for Order of Preference by Similarity to Ideal Solution) method, which is a multi-criteria decision analysis method. This package allows users to calculate TOPSIS scores and ranks for given datasets.
Installation
You can install the package using pip:
pip install 102203525_TOPSIS
Command-Line Usage
After installation, you can use the run-topsis command to perform the analysis.
Command Syntax
run-topsis <input_data_file> <weights> <impacts> <result_file_name>
<input_data_file>: Path to the input data file (CSV or Excel).<weights>: Comma-separated list of weights for each criterion.<impacts>: Comma-separated list of impacts for each criterion (+for beneficial,-for non-beneficial).<result_file_name>: Path to save the result file (CSV or Excel).
Sample Command
run-topsis data/input.xlsx "0.4,0.3,0.2,0.1" "+,+,-,+" result/output.xlsx
How It Works
- Data Loading: The script reads the input data from the specified file.
- Normalization: Each column is normalized to make the data comparable.
- Weighting: The normalized data is weighted according to the provided weights.
- Ideal Solutions: Ideal best and worst solutions are determined based on the impacts (
+or-). - Separation Measures: The distance of each alternative from the ideal best and worst solutions is calculated.
- TOPSIS Score: The relative closeness to the ideal solution is computed.
- Ranking: Alternatives are ranked based on their TOPSIS scores.
Example
Input Data (input.xlsx):
| Alternative | Criterion 1 | Criterion 2 | Criterion 3 | Criterion 4 |
|---|---|---|---|---|
| A | 250 | 16 | 12 | 5 |
| B | 200 | 20 | 8 | 3 |
| C | 300 | 11 | 15 | 7 |
| D | 275 | 15 | 10 | 4 |
Running the Command:
run-topsis input.xlsx "0.4,0.3,0.2,0.1" "+,+,-,+" output.xlsx
Result Data (output.xlsx):
| Alternative | Criterion 1 | Criterion 2 | Criterion 3 | Criterion 4 | topsis_scores | rank |
|---|---|---|---|---|---|---|
| A | 250 | 16 | 12 | 5 | 0.691 | 2 |
| B | 200 | 20 | 8 | 3 | 0.437 | 4 |
| C | 300 | 11 | 15 | 7 | 0.824 | 1 |
| D | 275 | 15 | 10 | 4 | 0.620 | 3 |
By following the above steps, you can easily perform TOPSIS analysis using the 102203525_TOPSIS package. For any issues or suggestions, feel free to open an issue on the GitHub repository.
The Link to this Python Package on PyPi
Metadata
Release files for 102203525-TOPSIS 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| 102203525_TOPSIS-0.1.3.tar.gz | 3.3 kB | Without provenance | Details for 102203525_TOPSIS-0.1.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| 102203525_TOPSIS-0.1.3-py3-none-any.whl | Python 3 | none | any | Details for 102203525_TOPSIS-0.1.3-py3-none-any.whl |
Total release size: 9.2 kB
Release files / 102203525_TOPSIS-0.1.3.tar.gz
| Download URL | 102203525_TOPSIS-0.1.3.tar.gz |
|---|---|
| Size | 3.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e495566ec914e555dfc80cfe93b48b8c2c8b43f09867f87a1b7d768da69d3c9c
|
|
BLAKE2b-256 checksum How to use checksums |
bace3601616bd9c5bf89ad89df242c0b007bfca7a79319e077da5b8c19f1e8ab
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.10.9
|
Release files / 102203525_TOPSIS-0.1.3-py3-none-any.whl
| Download URL | 102203525_TOPSIS-0.1.3-py3-none-any.whl |
|---|---|
| Size | 5.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
318afd2ee759624cb32612295e546d456482cd1c512068d97f14c7517e6a4810
|
|
BLAKE2b-256 checksum How to use checksums |
880b7bb228f8fab648da87722c5e41657ac726b82118ccec5ea1ca7f228ef0d1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.10.9
|
Security for 102203525-TOPSIS 0.1.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.