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 6c973b0 commit ab47c61Copy full SHA for ab47c61
mapie/tests/test_utils.py
@@ -298,3 +298,23 @@ def test_compute_quantiles_2D_and_3D(alphas: NDArray):
298
quantiles2 = compute_quantiles(vector2, alphas)
299
300
assert (quantiles1 == quantiles2).all()
301
+
302
303
+@pytest.mark.parametrize("estimator", [-1, 3, 0.2])
304
+def test_quantile_prefit_non_iterable(estimator: Any) -> None:
305
+ """
306
+ Test that there is a list of estimators provided when cv='prefit'
307
+ is called for MapieQuantileRegressor.
308
309
+ with pytest.raises(
310
+ ValueError,
311
+ match=r".*Estimator for prefit must be an iterable object.*",
312
+ ):
313
+ mapie_reg = MapieQuantileRegressor(
314
+ estimator=estimator,
315
+ cv="prefit"
316
+ )
317
+ mapie_reg.fit(
318
+ [1, 2, 3],
319
+ [4, 5, 6]
320
0 commit comments