DOC Add dropdowns to User Guide section 3.2, "Tuning the hyper-parameters of an estimator"#27631
Conversation
doc/modules/grid_search.rst
Outdated
| amount of flexibility in identifying the "best" estimator. This interface | ||
| can also be used in multiple metrics evaluation. | ||
| - See | ||
| :ref:`sphx_glr_auto_examples_model_selection_plot_grid_search_refit_callable.py` |
There was a problem hiding this comment.
those 2 examples seem to showcase very similar functionality
| (or `=np.nan`) will make the procedure robust to such failure, issuing a | ||
| warning and setting the score for that fold to 0 (or `nan`), but completing | ||
| the search. | ||
| Some parameter settings may result in a failure to ``fit`` one or more folds of |
There was a problem hiding this comment.
This is not related to dropdowns but that part appears to be outdated as error_score=np.nan is now the default; LMK if it should be handled in another issue & pr instead
There was a problem hiding this comment.
Nice catch! I think it's ok to address the issue here.
ArturoAmorQ
left a comment
There was a problem hiding this comment.
Thanks for your time and work @jeromedockes, I like your approach for using dropdowns. The only issue here is that they break the sphinx references (such as .. _amount_of_resource_and_number_of_candidates: in line 295). One can still use permalinks as introduced in #27409, but then we rather hide one subsection of 3.2.3 Searching for optimal parameters with successive halving at the time, or WDYT?
| (or `=np.nan`) will make the procedure robust to such failure, issuing a | ||
| warning and setting the score for that fold to 0 (or `nan`), but completing | ||
| the search. | ||
| Some parameter settings may result in a failure to ``fit`` one or more folds of |
There was a problem hiding this comment.
Nice catch! I think it's ok to address the issue here.
Sorry I missed that!
That sounds better. It might be a bit awkward to have 6 collapsed sections in a row, but better than breaking the references. |
AFAICT the ids added in #27409 are added with javascript when the page is rendered. if we use those anchors does that mean I should replace sphinx references with hyperlinks? one drawback is I guess those will not be checked by sphinx note here the situation is a bit different than #27408 because when the anchor is also inside the |
I don't think it is that awkward, we have 3 collapsed sections in a row in the Contributing Guide. If you find it pertinent, maybe we can keep a short intro to each subsection before hiding the rest in a dropdown. This would solve the problem with the hyperlinks. |
|
👀 |
ArturoAmorQ
left a comment
There was a problem hiding this comment.
Thanks for reviving this PR! Just a couple of comments :)
doc/modules/grid_search.rst
Outdated
| :ref:`exhausting_the_resources` for details. | ||
| |details-end| | ||
|
|
||
| .. _amount_of_resource_and_number_of_candidates: |
There was a problem hiding this comment.
We will have to use a permalink to replace this cross-reference. Happily it is only referenced from this rst file.
doc/modules/grid_search.rst
Outdated
| .. _amount_of_resource_and_number_of_candidates: | ||
|
|
||
| |details-start| | ||
| Amount of resource and number of candidates at each iteration |
There was a problem hiding this comment.
Maybe just a nit, but we can try to use bold titles for the dropdowns.
|
@jeromedockes Could you finish this PR. This is actually the last one from the meta issue and then we can close ;) |
|
Sorry about that! I'll finish it on Wednesday at the latest.
|
No worries, I was just doing some book keeping and just saw that it was the last issue. Take your time to solve this PR, there is no rush. |
ArturoAmorQ
left a comment
There was a problem hiding this comment.
LGTM. Let's merge and iterate over time if needed. Thanks @jeromedockes!
…ters of an estimator" (scikit-learn#27631)
…ters of an estimator" (#27631)
Reference Issues/PRs
closes #26617
What does this implement/fix? Explain your changes.
as described in #26617, shorten this section of the user guide by folding some parts in
<details>Any other comments?