Skip to content

Commit cc89808

Browse files
authored
Merge branch 'scikit-learn-contrib:master' into master
2 parents cdde3c5 + b75e212 commit cc89808

File tree

3 files changed

+28
-4
lines changed

3 files changed

+28
-4
lines changed

README.rst

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -203,10 +203,10 @@ For more information on the contribution process, please go `here <CONTRIBUTING.
203203
🤝 Affiliations
204204
================
205205

206-
MAPIE has been developed through a collaboration between Quantmetry, Michelin, and ENS Paris-Saclay
207-
with the financial support from Région Ile de France.
206+
MAPIE has been developed through a collaboration between Quantmetry, Michelin, ENS Paris-Saclay,
207+
Confiance.ai and with the financial support from Région Ile de France.
208208

209-
|Quantmetry|_ |Michelin|_ |ENS|_ |IledeFrance|_
209+
|Quantmetry|_ |Michelin|_ |ENS|_ |Confiance.ai|_ |IledeFrance|_
210210

211211
.. |Quantmetry| image:: https://www.quantmetry.com/wp-content/uploads/2020/08/08-Logo-quant-Texte-noir.svg
212212
:width: 150
@@ -220,6 +220,10 @@ with the financial support from Région Ile de France.
220220
:width: 100
221221
.. _ENS: https://ens-paris-saclay.fr/en
222222

223+
.. |Confiance.ai| image:: https://pbs.twimg.com/profile_images/1443838558549258264/EvWlv1Vq_400x400.jpg
224+
:width: 100
225+
.. _Confiance.ai: https://www.confiance.ai/
226+
223227
.. |IledeFrance| image:: https://www.iledefrance.fr/themes/custom/portail_idf/logo.svg
224228
:width: 100
225229
.. _IledeFrance: https://www.iledefrance.fr/

mapie/quantile_regression.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ class MapieQuantileRegressor(MapieRegressor):
131131
},
132132
"HistGradientBoostingRegressor": {
133133
"loss_name": "loss",
134-
"alpha_name": "alpha"
134+
"alpha_name": "quantile"
135135
},
136136
"LGBMRegressor": {
137137
"loss_name": "objective",

mapie/tests/test_utils.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,3 +298,23 @@ def test_compute_quantiles_2D_and_3D(alphas: NDArray):
298298
quantiles2 = compute_quantiles(vector2, alphas)
299299

300300
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

Comments
 (0)