You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
RandomizedSearchCV - Highest mean_test_score doesn't have rank 1 in rank_test_score in cv_results_ #17267
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:
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:
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.
Activity
thomasjpfan commentedon May 18, 2020
This is an error in the docs, the
rank_test_scoreshould be[1, 2, 2].We can also simplify the docstring by changing
rank_test_scoreto[0.81, 0.65, 0.71]and haverank_test_score =[1, 3, 2].@barberogaston Would you like to make a PR for this?
barberogaston commentedon May 18, 2020
Sure! Thanks for the early reply!