Skip to content

RandomizedSearchCV - Highest mean_test_score doesn't have rank 1 in rank_test_score in cv_results_ #17267

@barberogaston

Description

@barberogaston

Describe the issue linked to the documentation

While checking the RandomizedSearchCV docs we found out with a partner that the cv_results_ dict shows the following values for mean_test_score and rank_test_score:

{'mean_test_score': [0.81, 0.70, 0.70],
 'rank_test_score': [3, 1, 1]}

This would indicate that rank 3 is the best as its mean_test_score is the highest in the list, and so we could say that the maximum rank of the list rank_test_score is the best one.
However, in practice it turns out that actually rank 1 is the best of them, as seen in the following picture:

Captura de pantalla 2020-05-18 a la(s) 11 45 19

We can also see this here where the report() function ranges over [1; n_top].

Suggest a potential alternative/fix

If this is an error, I would suggest changing the rank_test_score so that the highest mean_test_score has rank 1.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions