<h3 dir="auto">Describe the workflow you want to enable</h3>
<p dir="auto">I need to use <code class="notranslate">StratifiedGroupKFold</code> on my data.</p>
<p dir="auto">Unlike <code class="notranslate">cross_validate</code>, <code class="notranslate">SequentialFeatureSelector.fit</code> method has no <code class="notranslate">**fit_params</code> or <code class="notranslate">groups</code> parameter, so I can't use group split.</p>
<h3 dir="auto">Describe your proposed solution</h3>
<ul dir="auto">
<li>Adding <code class="notranslate">**fit_params</code> or <code class="notranslate">groups</code> parameter to <code class="notranslate">SequentialFeatureSelector.fit</code> method.</li>
</ul>
<h3 dir="auto">Describe alternatives you've considered, if relevant</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">Additional context</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">Describe the workflow you want to enable</h3>
<p dir="auto">I would like to be able to pass sample weights to the <code class="notranslate">fit</code> method of the estimator in <code class="notranslate">SequentialFeatureSelector</code>. (<code class="notranslate">SelectFromModel</code> has this feature as well.)</p>
<p dir="auto">Looking at the code, it seems to me that <a href="https://github.com/scikit-learn/scikit-learn/blob/2e481f114169396660f0051eee1bcf6bcddfd556/sklearn/model_selection/_validation.py#L662"><code class="notranslate">sklearn.model_selection._validation._fit_and_score</code></a>, which is where the actual scoring takes place, already supports sample weights in cross-validation (i.e., takes care of passing only the weights for samples that are actually part of the fold).</p>
<h3 dir="auto">Describe your proposed solution</h3>
<p dir="auto">Based on my current understanding, <code class="notranslate">SequentialFeatureSelector.fit()</code> would need to get an additional argument <code class="notranslate">fit_params</code>  (cf. <a href="https://scikit-learn.org/stable/modules/generated/sklearn.feature_selection.SelectFromModel.html#sklearn.feature_selection.SelectFromModel.fit" rel="nofollow"><code class="notranslate">SelectFromModel.fit()</code></a>) that is passed on to the <code class="notranslate">cross_val_score</code> function called in <code class="notranslate">SequentialFeatureSelector._get_best_new_feature_score</code>. Everything else appears to be in place already.</p>
<p dir="auto">if that's all it takes, I'm happy to prepare a PR. But I might very well be overlooking issues or unintended consequences.</p>
<h3 dir="auto">Describe alternatives you've considered, if relevant</h3>
<p dir="auto"><em>No response</em></p>
<h3 dir="auto">Additional context</h3>
<p dir="auto"><em>No response</em></p>