Skip to content

Commit fb88e2a

Browse files
committed
taking VTA comments into account
1 parent 76b8edb commit fb88e2a

File tree

2 files changed

+3
-23
lines changed

2 files changed

+3
-23
lines changed

examples/regression/1-quickstart/plot_prefit.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
# -----------------------------------------------------------------------------
4040
#
4141
# We start by defining a function that we will use to generate data. We then
42-
# add random noise dependent variable values. Then we split the dataset to have
42+
# add random noise to the y values. Then we split the dataset to have
4343
# a training, calibration and test set.
4444

4545

mapie/tests/test_quantile_regression.py

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -519,26 +519,6 @@ def test_linear_regression_results(strategy: str) -> None:
519519
np.testing.assert_allclose(coverage, COVERAGES[strategy], rtol=1e-2)
520520

521521

522-
@pytest.mark.parametrize("estimator", [-1, 3, 0.2])
523-
def test_quantile_prefit_non_list(estimator: Any) -> None:
524-
"""
525-
Test that there is a list of estimators provided when cv='prefit'
526-
is called for MapieQuantileRegressor.
527-
"""
528-
with pytest.raises(
529-
ValueError,
530-
match=r".*Estimator for prefit must be an iterable object.*",
531-
):
532-
mapie_reg = MapieQuantileRegressor(
533-
estimator=estimator,
534-
cv="prefit"
535-
)
536-
mapie_reg.fit(
537-
X_calib_toy,
538-
y_calib_toy
539-
)
540-
541-
542522
def test_quantile_prefit_three_estimators() -> None:
543523
"""
544524
Test that there is a list with three estimators provided for
@@ -669,8 +649,8 @@ def test_prefit_and_non_prefit_equal(alpha: float) -> None:
669649
@pytest.mark.parametrize("alpha", [0.05, 0.1, 0.2, 0.3])
670650
def test_prefit_different_type_list_tuple_array(alpha: float) -> None:
671651
"""
672-
Check that as long as the estimators are given in a Iterable object,
673-
the we have the same results for each.}
652+
Check that the type of Iterable (list, np.array, tuple) to
653+
estimators gives similar results.
674654
"""
675655
list_estimators = []
676656
alphas_ = [alpha/2, 1-(alpha/2), 0.5]

0 commit comments

Comments
 (0)