Skip to content

Commit

Permalink
no axis=1 when taking posterior slice in MI
Browse files Browse the repository at this point in the history
  • Loading branch information
sampan501 authored Sep 12, 2023
1 parent f1a8e49 commit fd0b937
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sktree/stats/_might.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ def statistic(
posterior_final[:, 0], posterior_final[:, 1], max_fpr=self.limit
)
elif stat == "MI":
H_YX = np.mean(entropy(posterior_final[:, 1], base=np.exp(1), axis=1))
H_YX = np.mean(entropy(posterior_final[:, 1], base=np.exp(1)))
_, counts = np.unique(posterior_final[:, 0], return_counts=True)
H_Y = entropy(counts, base=np.exp(1))
self.stat = max(H_Y - H_YX, 0)
Expand Down

0 comments on commit fd0b937

Please sign in to comment.