Skip to content

Commit

Permalink
FIX: temporary warning users that optimize_beta is not working
Browse files Browse the repository at this point in the history
  • Loading branch information
Valentin-Laurent committed Jan 10, 2025
1 parent 9cbaad8 commit a44b877
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 8 additions & 0 deletions mapie/conformity_scores/regression.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import logging
from abc import ABCMeta, abstractmethod
from typing import Tuple

Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit a44b877

Please sign in to comment.