Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX: temporary warning users that optimize_beta is not working #596

Merged
merged 1 commit into from
Jan 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading