Inconsistent results with HalvingGridSearchCV

### Describe the bug

`best_params_` does not match top `rank_test_scores` in`cv_results_`.

### Steps/Code to Reproduce

Please see https://stackoverflow.com/q/74408418/4996152

### Expected Results

Expect best params to be top ranked result.

### Actual Results

The output of `best_params_` is not within the top 4 `rank_test_scores` in`cv_results_`.

### Versions

```shell
System:
    python: 3.7.15 (default, Oct 12 2022, 19:14:55)  [GCC 7.5.0]
executable: /usr/bin/python3
   machine: Linux-5.10.133+-x86_64-with-Ubuntu-18.04-bionic

Python dependencies:
          pip: 21.1.3
   setuptools: 57.4.0
      sklearn: 1.0.2
        numpy: 1.21.6
        scipy: 1.7.3
       Cython: 0.29.32
       pandas: 1.3.5
   matplotlib: 3.2.2
       joblib: 1.2.0
threadpoolctl: 3.1.0

Built with OpenMP: True
```

COMMENT:
I think there are a few things happening in this example. One is that `roc_auc` as a scorer produces a lot of warnings because `KNeighborsClassifier` doesn't have a `decision_function`. At least there are a lot of warnings about that. I don't understand why sometimes a score can be calculated and sometimes not though. This is one thing to investigate, but probably unrelated to this.

The other thing that is happening is that the highest `mean_test_score` is achieved not in the last iteration but in an earlier one. As a result `grid_result.best_params_`, `grid_result.cv_results_['params'][best_idx]` and `grid_result.cv_results_['mean_test_score'][best_idx]` all agree (with `best_idx = grid_result.best_index_`). But when you look at the output of:
```python
sorted_csv = pd.DataFrame(grid_result.cv_results_,
                          columns=['params', 'rank_test_score', 'mean_test_score']
                         ).sort_values('mean_test_score', ascending=False)
sorted_csv.head()
```
you see a result ranked number 1 with a score of 0.789. Which is higher than 0.746 which is reported as the score of `grid_result.best_params_`. If instead you limit yourself to the last iteration when printing the results:

```python
sorted_csv = pd.DataFrame(grid_result.cv_results_,
                          columns=['params', 'iter', 'rank_test_score', 'mean_test_score']
                         ).sort_values('mean_test_score', ascending=False)
sorted_csv[sorted_csv.iter == sorted_csv.iter.max()].head()
```
you recover the result from `grid_result.best_params_`.

It took me a while to figure this out, because it is just too intuitive to look at `grid_result.cv_results_['rank_test_score']` and think "yeah, the one ranked 1 should be in `best_params_`". I wonder what we can do about this.

On the one hand, the successive halving algorithm says "pick solution from final iteration" and most likely the uncertainty on the score from an earlier iteration means that the score fluctuated up (it isn't truly better).

On the other hand, `HalvingGridSearchCV` provides a ranking for all parameter combinations of all iterations in its public API which suggests that you should look at it and use it.

A third thought/question: does it happen that algorithms get a worse test score when the resource (in this case `n_samples`) is increased?

Labels: Documentation, help wanted, module:model_selection