Skip to content

Commit 2e18a9f

Browse files
committed
Merge branch '432-issue-with-mapie-dev-environment' into 439-specifying-conda-version
2 parents 0727a27 + 7b5b30c commit 2e18a9f

File tree

3 files changed

+7
-13
lines changed

3 files changed

+7
-13
lines changed

examples/regression/2-advanced-analysis/plot_timeseries_enbpi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@
165165
print(
166166
"Coverage / prediction interval width mean for MapieTimeSeriesRegressor: "
167167
"\nEnbPI without any partial_fit:"
168-
f"{coverage_npfit_enbpi :.3f}, {width_npfit_enbpi:.3f}"
168+
f"{coverage_npfit_enbpi:.3f}, {width_npfit_enbpi:.3f}"
169169
)
170170
print(
171171
"Coverage / prediction interval width mean for MapieTimeSeriesRegressor: "

mapie/calibration.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -96,16 +96,6 @@ class MapieCalibrator(BaseEstimator, ClassifierMixin):
9696
>>> y_toy = np.stack([0, 0, 1, 0, 1, 2, 1, 2, 2])
9797
>>> mapie = MapieCalibrator().fit(X_toy, y_toy, random_state=20)
9898
>>> y_calib = mapie.predict_proba(X_toy)
99-
>>> print(y_calib)
100-
[[0.84900723 nan nan]
101-
[0.75432411 nan nan]
102-
[0.62285341 nan nan]
103-
[ nan 0.33333333 nan]
104-
[ nan 0.33333333 nan]
105-
[ nan 0.33333333 nan]
106-
[ nan nan 0.33333002]
107-
[ nan nan 0.54326683]
108-
[ nan nan 0.66666124]]
10999
"""
110100

111101
fit_attributes = [

mapie/tests/test_calibration.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,9 @@ def test_correct_results(cv: str) -> None:
314314
pred_ = mapie_cal.predict_proba(X_test)
315315
top_label_ece_ = top_label_ece(y_test, pred_)
316316
np.testing.assert_array_almost_equal(
317-
results[cv]["y_score"], pred_ # type:ignore
317+
np.array(results[cv]["y_score"]),
318+
np.array(pred_),
319+
decimal=2
318320
)
319321
np.testing.assert_allclose( # type:ignore
320322
results[cv]["top_label_ece"],
@@ -345,7 +347,9 @@ def test_correct_results_binary(cv: str) -> None:
345347
top_label_ece_ = top_label_ece(y_binary, pred_)
346348
ece = expected_calibration_error(y_binary, pred_)
347349
np.testing.assert_array_almost_equal(
348-
results_binary[cv]["y_score"], pred_ # type:ignore
350+
np.array(results_binary[cv]["y_score"]),
351+
np.array(pred_),
352+
decimal=2
349353
)
350354
np.testing.assert_allclose( # type:ignore
351355
results_binary[cv]["top_label_ece"],

0 commit comments

Comments
 (0)