Skip to content

Commit

Permalink
Refactor determine_in_out_of_cls_marginal_accuracies.
Browse files Browse the repository at this point in the history
  • Loading branch information
Markus Semmler committed Jan 3, 2024
1 parent 54b0dd1 commit d783385
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/re_classwise_shapley/plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,9 @@ def plot_threshold_characteristics(
ax = ax.flatten()
for dataset_idx, dataset_name in enumerate(dataset_names):
dataset_df = results[dataset_name]["threshold_characteristics"]
idx = np.argwhere(np.max(dataset_df, axis=1) >= max_plotting_percentage)[-1, 0]
idx = np.argwhere(np.max(dataset_df.values, axis=1) >= max_plotting_percentage)[
-1, 0
]
dataset_df.iloc[:idx].plot_threshold_characteristics(ax=ax[dataset_idx])
ax[dataset_idx].set_xlim(0, dataset_df.index[idx])
ax[dataset_idx].set_title(f"({chr(97 + dataset_idx)}) {dataset_name}")
Expand Down

0 comments on commit d783385

Please sign in to comment.