handson-ml2 icon indicating copy to clipboard operation
handson-ml2 copied to clipboard

[IDEA] Result Readability - 02_end_to_end_machine_learning_project.ipynb

Open derycck opened this issue 3 years ago • 2 comments

To improve the readability of which parameter is more efficient in cv_results, I suggest a small adaptation in the code:

Notebook: 02_end_to_end_machine_learning_project

In cell 105

From:

cvres = rnd_search.cv_results_
for mean_score, params in zip(cvres["mean_test_score"], cvres["params"]):
    print(np.sqrt(-mean_score), params)

To:

cvres = rnd_search.cv_results_
for rank, mean_score, params in zip(cvres['rank_test_score'], cvres['mean_test_score'], cvres['params']):
    print(rank, np.sqrt(-mean_score), params)

derycck avatar May 16 '21 21:05 derycck

Hi @derycck , Thanks for the suggestion! Would you like to submit a PR? If not, I can do it, as you wish.

ageron avatar May 17 '21 07:05 ageron

sure... If you can wait, next monday i could do the PR : )

derycck avatar May 18 '21 14:05 derycck