Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion mapie/tests/risk_control/test_control_risk.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def test_compute_recall_with_wrong_shape() -> None:


def test_compute_precision_with_wrong_shape() -> None:
"""Test shape when using _compute_precision"""
"""Test error when wrong shape in _compute_precision"""
with pytest.raises(ValueError, match=r".*y_pred_proba should be a 3d*"):
compute_risk_precision(lambdas, y_preds_proba.squeeze(), y_toy)
with pytest.raises(ValueError, match=r".*y should be a 2d*"):
Expand Down
4 changes: 2 additions & 2 deletions mapie/tests/risk_control/test_precision_recall_control.py
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,7 @@ def test_bound_none_crc() -> None:


def test_delta_none_crc() -> None:
"""Test that a warning is raised nound is not None with CRC method."""
"""Test that a warning is raised when delta is not None with CRC method."""
mapie_clf = PrecisionRecallController(
random_state=random_state, method="crc"
)
Expand All @@ -598,7 +598,7 @@ def test_delta_none_crc() -> None:


def test_warning_estimator_none() -> None:
"""Test that a warning is raised nound is not None with CRC method."""
"""Test that a warning is raised when estimator is not None with CRC method."""
mapie_clf = PrecisionRecallController(random_state=random_state)
with pytest.warns(UserWarning, match=r"WARNING: To avoid overfitting,*"):
mapie_clf.fit(X_toy, y_toy)
Expand Down
Loading