|
12 | 12 | from sklearn.model_selection import train_test_split
|
13 | 13 |
|
14 | 14 | from mapie.subsample import Subsample
|
15 |
| -from mapie._typing import ArrayLike |
| 15 | +from mapie._typing import ArrayLike, NDArray |
16 | 16 | from mapie.conformity_scores import GammaConformityScore, \
|
17 | 17 | AbsoluteConformityScore, ResidualNormalisedScore
|
18 | 18 | from mapie_v1.regression import SplitConformalRegressor, \
|
|
136 | 136 |
|
137 | 137 |
|
138 | 138 | @pytest.mark.parametrize("params_split", params_test_cases_split)
|
139 |
| -def test_intervals_and_predictions_exact_equality_split(params_split): |
| 139 | +def test_intervals_and_predictions_exact_equality_split(params_split: dict) -> None: |
140 | 140 | v0_params = params_split["v0"]
|
141 | 141 | v1_params = params_split["v1"]
|
142 | 142 |
|
@@ -222,7 +222,7 @@ def test_intervals_and_predictions_exact_equality_split(params_split):
|
222 | 222 |
|
223 | 223 |
|
224 | 224 | @pytest.mark.parametrize("params_cross", params_test_cases_cross)
|
225 |
| -def test_intervals_and_predictions_exact_equality_cross(params_cross): |
| 225 | +def test_intervals_and_predictions_exact_equality_cross(params_cross: dict) -> None: |
226 | 226 |
|
227 | 227 | compare_model_predictions_and_intervals(
|
228 | 228 | model_v0=MapieRegressorV0,
|
@@ -313,7 +313,9 @@ def test_intervals_and_predictions_exact_equality_cross(params_cross):
|
313 | 313 |
|
314 | 314 |
|
315 | 315 | @pytest.mark.parametrize("params_jackknife", params_test_cases_jackknife)
|
316 |
| -def test_intervals_and_predictions_exact_equality_jackknife(params_jackknife): |
| 316 | +def test_intervals_and_predictions_exact_equality_jackknife( |
| 317 | + params_jackknife: dict |
| 318 | +) -> None: |
317 | 319 |
|
318 | 320 | compare_model_predictions_and_intervals(
|
319 | 321 | model_v0=MapieRegressorV0,
|
@@ -419,7 +421,9 @@ def test_intervals_and_predictions_exact_equality_jackknife(params_jackknife):
|
419 | 421 |
|
420 | 422 |
|
421 | 423 | @pytest.mark.parametrize("params_quantile", params_test_cases_quantile)
|
422 |
| -def test_intervals_and_predictions_exact_equality_quantile(params_quantile): |
| 424 | +def test_intervals_and_predictions_exact_equality_quantile( |
| 425 | + params_quantile: dict |
| 426 | +) -> None: |
423 | 427 | v0_params = params_quantile["v0"]
|
424 | 428 | v1_params = params_quantile["v1"]
|
425 | 429 |
|
@@ -447,8 +451,8 @@ def compare_model_predictions_and_intervals(
|
447 | 451 | JackknifeAfterBootstrapRegressor,
|
448 | 452 | ConformalizedQuantileRegressor
|
449 | 453 | ]],
|
450 |
| - X: ArrayLike, |
451 |
| - y: ArrayLike, |
| 454 | + X: NDArray, |
| 455 | + y: NDArray, |
452 | 456 | v0_params: Dict = {},
|
453 | 457 | v1_params: Dict = {},
|
454 | 458 | prefit: bool = False,
|
|
0 commit comments