TOPSIS-Sidharth-102218069
Overview
This package implements the TOPSIS (Technique for Order of Preference by Similarity to Ideal Solution) method for multi-criteria decision-making. The method ranks alternatives based on their relative closeness to the ideal solution.
Installation
You can install the package directly from PyPI using the following command:
pip install topsis-sidharth-102218069
Usage
You can use this package from the command line to calculate TOPSIS scores and rankings for a given dataset.
Command Line
topsis_69 <Weights> <Impacts> <InputDataFile> <ResultFileName>
Example
topsis_69 "1,1,1,2" "+,+,-,+" 102218069-data.csv 102218069-result.csv
Parameters
<Weights>: Comma-separated weights for each criterion.<Impacts>: Comma-separated impacts for each criterion, where each impact is either+(beneficial) or-(non-beneficial).<InputDataFile>: Path to the input CSV file containing the data.<ResultFileName>: The name of the output CSV file where the results will be saved.
Sample Input File Format
The input CSV file should have the following structure:
| Fund Name | P1 | P2 | P3 | P4 | P5 |
|---|---|---|---|---|---|
| M1 | 0.84 | 0.71 | 6.7 | 42.1 | 12.59 |
| M2 | 0.91 | 0.83 | 7.0 | 31.7 | 10.11 |
| ... | ... | ... | ... | ... | ... |
Sample Output File Format
The output CSV file will have the following structure:
| Fund Name | P1 | P2 | P3 | P4 | P5 | Topsis Score | Rank |
|---|---|---|---|---|---|---|---|
| M1 | 0.84 | 0.71 | 6.7 | 42.1 | 12.59 | 0.3653 | 6 |
| M2 | 0.91 | 0.83 | 7.0 | 31.7 | 10.11 | 0.2819 | 8 |
| ... | ... | ... | ... | ... | ... | ... | ... |
Error Handling
The program will raise an error and terminate if:
- The input file is not found.
- The number of weights and impacts does not match the number of criteria.
- Impacts contain values other than
+or-. - Weights are not numeric.
Dependencies
pandasnumpy
These dependencies are automatically installed when you install the package.
Author
Sidharth Dhawan
License
This project is licensed under the MIT License.
Release files for topsis-sidharth-102218069 0.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| topsis-sidharth-102218069-0.5.tar.gz | 4.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| topsis_sidharth_102218069-0.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.0 kB
Release files / topsis-sidharth-102218069-0.5.tar.gz
| Download URL | topsis-sidharth-102218069-0.5.tar.gz |
|---|---|
| Size | 4.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d76c30e1febde9adfcc2e4593184395c7475335d4c946b313e335e2e5e11194a
|
|
BLAKE2b-256 checksum How to use checksums |
40246dcb259424db2def77e0e75aeb75497d69bd174764416068d9c5286d99e3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.9
|
Release files / topsis_sidharth_102218069-0.5-py3-none-any.whl
| Download URL | topsis_sidharth_102218069-0.5-py3-none-any.whl |
|---|---|
| Size | 4.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5eca75e2557231329430f924beac2f630b53711865bd034676aee5fcbedfc127
|
|
BLAKE2b-256 checksum How to use checksums |
72d7e87d19324cbca8938a8471b415b50acb3a052e3a2f7ea36f99711708b94a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.9
|