From fd0b937577f483b56fd6281a73621596975eff9d Mon Sep 17 00:00:00 2001 From: Sambit Panda <36676569+sampan501@users.noreply.github.com> Date: Tue, 12 Sep 2023 08:15:30 -0400 Subject: [PATCH] no axis=1 when taking posterior slice in MI --- sktree/stats/_might.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sktree/stats/_might.py b/sktree/stats/_might.py index 0fb8b66f2..3c9d79421 100644 --- a/sktree/stats/_might.py +++ b/sktree/stats/_might.py @@ -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)