Check whether 0.9 really means 90%
Before trusting any probability threshold in a business rule, look at the calibration curve.
from sklearn.calibration import calibration_curve
import numpy as np
prob_true, prob_pred = calibration_curve(y_test, p, n_bins=10,
strategy="quantile")
print(f"{'predicted':>10} {'actual':>10} gap")
for pred, true in zip(prob_pred, prob_true):
print(f"{pred:10.3f} {true:10.3f} {true - pred:+.3f}")
# predicted actual gap
# 0.021 0.008 -0.013
# 0.108 0.061 -0.047
# 0.294 0.187 -0.107 <- claims 29%, delivers 19%
# 0.612 0.478 -0.134 <- systematically overconfident
# 0.891 0.812 -0.079
#
# A rule firing at p > 0.6 is catching cases that are really about 48%
# likely. Whether that matters depends on the rule, but you should
# know it before someone else finds out.