Skip to content

Commit a489b6c

Browse files
committed
fix: bugfix for subsampled eer
1 parent 3f6bbcb commit a489b6c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

modAL/expected_error.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def expected_error_reduction(learner: ActiveLearner, X: modALinput,
6161
expected_error[x_idx] += np.sum(uncertainty)*X_proba[x_idx, y_idx]
6262

6363
else:
64-
expected_error[x_idx] -np.nan
64+
expected_error[x_idx] = np.inf
6565

6666
query_idx = multi_argmax(expected_error, n_instances)
6767

@@ -114,7 +114,7 @@ def expected_log_loss_reduction(learner: ActiveLearner, X: modALinput,
114114
expected_log_loss[x_idx] += np.sum(entr)*X_proba[x_idx, y_idx]
115115

116116
else:
117-
expected_log_loss[x_idx] -np.nan
117+
expected_log_loss[x_idx] = np.inf
118118

119119
query_idx = multi_argmax(expected_log_loss, n_instances)
120120

0 commit comments

Comments
 (0)