Observed since 20 Oct, 15:08 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
A Python implementation of the TOPSIS
TOPSIS - This is a method which we can use to make decisions if we have multiple parameters from which we have to decide which model to choose by giving weights(preference) to those parameters and maximising or minimising them.
pip install 102203594_topsis
Input File: A CSV file containing the decision matrix.
Weights: A list of numeric values representing the weight of each criterion.
Impacts: A list of strings ('up' or 'down') indicating whether higher or lower values are better for each criterion.
File: data.csv
Alternative,Criterion 1,Criterion 2,Criterion 3
Model-1,250,16,12
Model-2,200,16,8
Model-3,300,32,16
Model-4,275,32,8
Model-5,225,16,16
from topsis import topsis
# Define weights and impacts
weights = [0.25, 0.25, 0.25]
impacts = ['up', 'up', 'down']
# Perform TOPSIS
try:
result = topsis("data.csv", weights, impacts)
print(result)
except Exception as e:
print(f"Error: {e}")
The output is a DataFrame containing the original data with two additional columns:
Alternative Criterion 1 Criterion 2 Criterion 3 Topsis Score Rank
0 Model-1 250 16 12 0.534522 3
1 Model-2 200 16 8 0.308607 5
2 Model-3 300 32 16 0.780869 1
3 Model-4 275 32 8 0.612372 2
4 Model-5 225 16 16 0.199736 4
The package includes robust error handling for:
.csv file.'up' or 'down'.Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 0.1.0 | 19 Jan 2025 | 1 |
This describes our collected data; it is not a security assessment.
Observed since 20 Oct, 15:08 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:c4b3b420d8f74176d3c547f98578e2144c6bb6b19031e4eec2ba86889a0a594f