diff --git a/HISTORY.rst b/HISTORY.rst index 7dd5d83cd..842bf2697 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -11,6 +11,7 @@ History * Fix issue 548 to correct labels generated in tutorial * Fix issue 547 to fix wrong warning * Fix issue 480 (correct display of mathematical equations in generated notebooks) +* Temporary solution waiting for issue 588 to be fixed (optimize_beta not working) * Remove several irrelevant user warnings * Limit max sklearn version allowed at MAPIE installation * Refactor MapieRegressor, EnsembleRegressor, and MapieQuantileRegressor, to prepare for the release of v1.0.0 diff --git a/mapie/conformity_scores/regression.py b/mapie/conformity_scores/regression.py index e8ad3d44d..b58f4a264 100644 --- a/mapie/conformity_scores/regression.py +++ b/mapie/conformity_scores/regression.py @@ -1,3 +1,4 @@ +import logging from abc import ABCMeta, abstractmethod from typing import Tuple @@ -217,6 +218,13 @@ def _beta_optimize( Array of betas minimizing the differences ``(1-alpha+beta)-quantile - beta-quantile``. """ + # Using logging.warning instead of warnings.warn to avoid warnings during tests + logging.warning( + "The option to optimize beta (minimize interval width) is not working and " + "needs to be fixed. See more details in " + "https://github.com/scikit-learn-contrib/MAPIE/issues/588" + ) + beta_np = np.full( shape=(len(lower_bounds), len(alpha_np)), fill_value=np.nan,