Skip to content

Commit f6fbef1

Browse files
committed
add tests: model compairison diagnostic plots
1 parent 7f09744 commit f6fbef1

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

tests/test_diagnostics/test_diagnostics_plots.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,3 +102,18 @@ def test_pairs_posterior(random_estimates, random_targets, random_priors):
102102
priors=random_priors,
103103
dataset_id=[1, 3],
104104
)
105+
106+
107+
def test_mc_calibration(pred_models, true_models, model_names):
108+
out = bf.diagnostics.plots.mc_calibration(pred_models, true_models, model_names=model_names)
109+
assert len(out.axes) == pred_models.shape[-1]
110+
assert out.axes[0].get_ylabel() == "True Probability"
111+
assert out.axes[0].get_xlabel() == "Predicted Probability"
112+
assert out.axes[-1].get_title() == r"$\mathcal{M}_2$"
113+
114+
115+
def test_mc_confusion_matrix(pred_models, true_models, model_names):
116+
out = bf.diagnostics.plots.mc_confusion_matrix(pred_models, true_models, model_names, normalize="true")
117+
assert out.axes[0].get_ylabel() == "True model"
118+
assert out.axes[0].get_xlabel() == "Predicted model"
119+
assert out.axes[0].get_title() == "Confusion Matrix"

0 commit comments

Comments
 (0)