"PDTP metric only supports classifiers that output logits or probabilities."
)
// divide into 100 bins and return center of bin
pred_bin = (np.floor(pred * 100) / 100).round(decimals=2) + 0.005
pred_bin[pred_bin > 1] = 0.995
if not indexes:
indexes = range(x.shape[0])
After Change
"PDTP metric only supports classifiers that output logits or probabilities."
)
// divide into 100 bins and return center of bin
bins = np.array(np.arange(0.0, 1.01, 0.01).round(decimals=2))
pred_bin_indexes = np.digitize(pred, bins)
pred_bin = bins[pred_bin_indexes] - 0.005
if not indexes:
indexes = range(x.shape[0])
for row in indexes: