We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ef1f2cf commit 13bc6c7Copy full SHA for 13bc6c7
mapie/tests/risk_control/test_precision_recall_control.py
@@ -784,3 +784,19 @@ def test_method_none_recall() -> None:
784
)
785
mapie_clf.calibrate(X_toy, y_toy)
786
assert mapie_clf.method == "crc"
787
+
788
789
+def test_compute_best_predict_param_invalid_risk():
790
+ """
791
+ Test that compute_best_predict_param raises error for an unsupported risk value.
792
793
+ mapie_clf = MultiLabelClassificationController(
794
+ predict_function=toy_predict_function, risk="recall"
795
+ )
796
+ mapie_clf.compute_risks(X_toy, y_toy)
797
+ mapie_clf._risk = "false_pos_rate"
798
+ with pytest.raises(
799
+ NotImplementedError,
800
+ match=r".*risk not implemented.*",
801
+ ):
802
+ mapie_clf.compute_best_predict_param()
0 commit comments