<p dir="auto">In some PRs for adding validation to functions: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1448885706" data-permission-text="Title is private" data-url="https://github.com/scikit-learn/scikit-learn/issues/24924" data-hovercard-type="pull_request" data-hovercard-url="/scikit-learn/scikit-learn/pull/24924/hovercard" href="https://github.com/scikit-learn/scikit-learn/pull/24924">#24924</a> or <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1463740254" data-permission-text="Title is private" data-url="https://github.com/scikit-learn/scikit-learn/issues/25026" data-hovercard-type="pull_request" data-hovercard-url="/scikit-learn/scikit-learn/pull/25026/hovercard" href="https://github.com/scikit-learn/scikit-learn/pull/25026">#25026</a>, there will be double validation, by the function and another by the estimator. <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/adrinjalali/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/adrinjalali">@adrinjalali</a> and I share the same concern about keeping constraints in sync between the function and the estimator: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1448885706" data-permission-text="Title is private" data-url="https://github.com/scikit-learn/scikit-learn/issues/24924" data-hovercard-type="pull_request" data-hovercard-url="/scikit-learn/scikit-learn/pull/24924/hovercard?comment_id=1029871876&amp;comment_type=review_comment" href="https://github.com/scikit-learn/scikit-learn/pull/24924#discussion_r1029871876">#24924 (comment)</a>, <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1463740254" data-permission-text="Title is private" data-url="https://github.com/scikit-learn/scikit-learn/issues/25026" data-hovercard-type="pull_request" data-hovercard-url="/scikit-learn/scikit-learn/pull/25026/hovercard?comment_id=1328780076&amp;comment_type=issue_comment" href="https://github.com/scikit-learn/scikit-learn/pull/25026#issuecomment-1328780076">#25026 (comment)</a>.</p>
<p dir="auto">The test for validation is very strict about including a constraint for every parameter. I see the purpose of having this strictness is such that when a new parameter is added, then a constraint is also included.</p>
<p dir="auto">I propose adding a <code class="notranslate">parameters_to_validate</code> to <code class="notranslate">validate_params</code> which is a collection of strings that states which parameters should be validated. This way when a new parameter is added, the default is to add a constraint for the new parameter, but it can be ignored by adding it to the <code class="notranslate">parameters_to_validate</code> list.</p>
<p dir="auto">CC <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/jeremiedbb/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/jeremiedbb">@jeremiedbb</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/glemaitre/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/glemaitre">@glemaitre</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/adrinjalali/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/adrinjalali">@adrinjalali</a></p>
<p dir="auto">I think we agreed that "labels" is a bad name for what it does in cross-validation. We could rename it to groups in the model-selection module, akin to what we did in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="170333219" data-permission-text="Title is private" data-url="https://github.com/scikit-learn/scikit-learn/issues/7169" data-hovercard-type="issue" data-hovercard-url="/scikit-learn/scikit-learn/issues/7169/hovercard" href="https://github.com/scikit-learn/scikit-learn/issues/7169">#7169</a>.<br>
This is kind of a "now or never". It definitely has cost. I think it might be worth it (I just had a discussion where someone was looking for this exact feature but couldn't find it because of the name).<br>
<a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/jnothman/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/jnothman">@jnothman</a> and <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/GaelVaroquaux/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/GaelVaroquaux">@GaelVaroquaux</a> certainly have opinions ;)</p>