<h3 dir="auto">Describe the workflow you want to enable</h3>
<p dir="auto">I want to be able to run Forward Sequential Feature Selector and know the order which it picked the features.<br>
Right now you can only get the indices or a boolean mask of all the features you've selected. Of course, you can run it once and select 1 feature, then run it again and select 2 features, and continue this to pull out the order that features were selected. However, this would be unnecessarily computationally costly.</p>
<h3 dir="auto">Describe your proposed solution</h3>
<p dir="auto">Add an attribute <code class="notranslate">feature_order</code>. I should be able to do <code class="notranslate">SequentialFeatureSelector.feature_order</code> and get an array of the indices of the features as they are selected.<br>
I edited the source code (sklearn/feature_selection/_sequential.py) on my laptop with just 3 lines of code and it works.<br>
Under the function <code class="notranslate">def fit(...)</code> I added:</p>
<blockquote>
<p dir="auto">feature_order = []                                      # before the for loop<br>
feature_order.append(new_feature_idx) # this is at the end of the for loop<br>
self.feature_order = feature_order           # at the end of the function</p>
</blockquote>
<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>
<p dir="auto">Is it currently possible to extract the order in which the features in the sequential feature selection transformer are selected?<br>
Similar to the ranking in the RFE transformer for example.</p>