Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
Signed-off-by: Adam Li <[email protected]>
  • Loading branch information
adam2392 committed Sep 28, 2023
1 parent 028f17d commit 2f06e76
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1223,6 +1223,18 @@
"(125, 600, 1) (125, 600, 1)\n",
"X1: 0.004975124378109453\n",
"(125, 600, 1) (125, 600, 1)\n",
"X500: 0.004975124378109453\n",
"(125, 600, 1) (125, 600, 1)\n",
"X2: 0.004975124378109453\n",
"(125, 600, 1) (125, 600, 1)\n",
"X1: 0.004975124378109453\n",
"(125, 600, 1) (125, 600, 1)\n",
"X500: 1.0\n",
"(125, 600, 1) (125, 600, 1)\n",
"X2: 0.004975124378109453\n",
"(125, 600, 1) (125, 600, 1)\n",
"X1: 1.0\n",
"(125, 600, 1) (125, 600, 1)\n",
"X500: 0.004975124378109453\n"
]
}
Expand Down
7 changes: 1 addition & 6 deletions sktree/stats/forestht.py
Original file line number Diff line number Diff line change
Expand Up @@ -785,14 +785,9 @@ def _statistic(
)

# determine if there are any nans in the final posterior array
# Average all posteriors (n_samples_test, n_outputs)
# posterior_forest = np.nanmean(posterior_arr, axis=0)

# # Find the row indices with NaN values in any column
# nonnan_indices = np.where(~np.isnan(posterior_forest).any(axis=1))[0]
# Find the row indices with NaN values in any column
nonnan_indices = np.all(~np.isnan(posterior_arr), axis=(0, 2))
samples = nonnan_indices
print(nonnan_indices)

# Ignore all NaN values (samples not tested)
y_true_final = y[(nonnan_indices), :]
Expand Down

0 comments on commit 2f06e76

Please sign in to comment.