File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -406,7 +406,7 @@ def _get_last_index_included(
406406 np .argmin (
407407 np .ma .masked_less (
408408 y_pred_proba_cumsum ,
409- threshold [np .newaxis , np .newaxis , :]
409+ threshold [np .newaxis , np .newaxis , :] - EPSILON
410410 ),
411411 axis = 1
412412 )
@@ -418,7 +418,10 @@ def _get_last_index_included(
418418 )
419419 y_pred_index_last = np .argmax (
420420 np .ma .masked_where (
421- y_pred_proba_cumsum > max_threshold [:, np .newaxis , :],
421+ (
422+ y_pred_proba_cumsum >
423+ max_threshold [:, np .newaxis , :] - EPSILON
424+ ),
422425 y_pred_proba_cumsum ,
423426 ), axis = 1
424427 )
@@ -955,7 +958,7 @@ def predict(
955958 # above the last one
956959 if (cv == "prefit" ) or (agg_scores in ["mean" ]):
957960 y_pred_included = (
958- (y_pred_proba >= y_pred_proba_last - EPSILON )
961+ (y_pred_proba > y_pred_proba_last - EPSILON )
959962 )
960963 else :
961964 y_pred_included = (
You can’t perform that action at this time.
0 commit comments