Skip to content

Commit 4254df9

Browse files
committed
Merge branch 'oyvindsam-entropy' into dev
2 parents 8cbaea9 + 82c3158 commit 4254df9

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

modAL/disagreement.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,14 @@ def vote_entropy(committee: BaseCommittee, X: modALinput, **predict_proba_kwargs
3535
return np.zeros(shape=(X.shape[0],))
3636

3737
p_vote = np.zeros(shape=(X.shape[0], len(committee.classes_)))
38-
entr = np.zeros(shape=(X.shape[0],))
3938

4039
for vote_idx, vote in enumerate(votes):
4140
vote_counter = Counter(vote)
4241

4342
for class_idx, class_label in enumerate(committee.classes_):
4443
p_vote[vote_idx, class_idx] = vote_counter[class_label]/n_learners
4544

46-
entr[vote_idx] = entropy(p_vote[vote_idx])
47-
45+
entr = entropy(p_vote, axis=1)
4846
return entr
4947

5048

0 commit comments

Comments
 (0)