Skip to content

Commit

Permalink
Merge branch 'scikit-learn-contrib:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
adamzenith authored Dec 14, 2022
2 parents cdde3c5 + b75e212 commit cc89808
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 4 deletions.
10 changes: 7 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -203,10 +203,10 @@ For more information on the contribution process, please go `here <CONTRIBUTING.
🤝 Affiliations
================

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

|Quantmetry|_ |Michelin|_ |ENS|_ |IledeFrance|_
|Quantmetry|_ |Michelin|_ |ENS|_ |Confiance.ai|_ |IledeFrance|_

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

.. |Confiance.ai| image:: https://pbs.twimg.com/profile_images/1443838558549258264/EvWlv1Vq_400x400.jpg
:width: 100
.. _Confiance.ai: https://www.confiance.ai/

.. |IledeFrance| image:: https://www.iledefrance.fr/themes/custom/portail_idf/logo.svg
:width: 100
.. _IledeFrance: https://www.iledefrance.fr/
Expand Down
2 changes: 1 addition & 1 deletion mapie/quantile_regression.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ class MapieQuantileRegressor(MapieRegressor):
},
"HistGradientBoostingRegressor": {
"loss_name": "loss",
"alpha_name": "alpha"
"alpha_name": "quantile"
},
"LGBMRegressor": {
"loss_name": "objective",
Expand Down
20 changes: 20 additions & 0 deletions mapie/tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,3 +298,23 @@ def test_compute_quantiles_2D_and_3D(alphas: NDArray):
quantiles2 = compute_quantiles(vector2, alphas)

assert (quantiles1 == quantiles2).all()


@pytest.mark.parametrize("estimator", [-1, 3, 0.2])
def test_quantile_prefit_non_iterable(estimator: Any) -> None:
"""
Test that there is a list of estimators provided when cv='prefit'
is called for MapieQuantileRegressor.
"""
with pytest.raises(
ValueError,
match=r".*Estimator for prefit must be an iterable object.*",
):
mapie_reg = MapieQuantileRegressor(
estimator=estimator,
cv="prefit"
)
mapie_reg.fit(
[1, 2, 3],
[4, 5, 6]
)

0 comments on commit cc89808

Please sign in to comment.