Skip to content

Commit 1d557d8

Browse files
committed
Fixing incorrect calculations of bits from probabilities (#126)
1 parent bf8dffc commit 1d557d8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

xgboost_bench/gbt.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def convert_xgb_predictions(y_pred, objective):
2929
if objective == 'multi:softprob':
3030
y_pred = convert_probs_to_classes(y_pred)
3131
elif objective == 'binary:logistic':
32-
y_pred = y_pred.astype(np.int32)
32+
y_pred = (y_pred >= 0.5).astype(np.int32)
3333
return y_pred
3434

3535

0 commit comments

Comments
 (0)