Fix CNN prediction threshold for binary classification #18368
Annotations
2 errors
|
ruff
Process completed with exit code 1.
|
|
ruff (SIM108):
computer_vision/cnn_classification.py#L99
computer_vision/cnn_classification.py:99:5: SIM108 Use ternary operator `prediction = "Normal" if result[0][0] < 0.5 else "Abnormality detected"` instead of `if`-`else`-block
help: Replace `if`-`else`-block with `prediction = "Normal" if result[0][0] < 0.5 else "Abnormality detected"`
|