Iterative RFE scores sklearn
<p>I'm using RFE with ExtraTreeRegressor as estimator in order to make SupervisedFeatureSelection in a regression problem. </p>

<p>I get the ranking and the support from the model with the common code below:</p>

<pre><code>rfe_vola = RFE(estimator=ExtraTreesRegressor(), n_features_to_select=1, step=1)
rfe_vola.fit(X_allfeatures, y_vol)
ranking_vola = rfe_vola.ranking_
print("ranking: ",ranking_vola)
print("support: ",rfe_vola.support_)
</code></pre>

<p>what I would like to have, is a deeper information, thus the scores or the features evaluation at each iteration of RFE. I've noticed that there are some hidden function like _fit, and I'm thinking in trying to force the step_score parameter to be different from none... 
The point is that I'm not able to reach what I want.. (I'm new to python...) I would like to get the print of the scores at each iteration. Is there anyone who have experience with such a task? What should be a proper value of the step_score parameter? ( I've tried with a boolean but it doesn't work )</p>

<p>Thanks for any advice!!!</p>

<p>That is was I was looking for:</p>

<pre><code>from sklearn.metrics import r2_score

rfe_vola = RFE(estimator=ExtraTreesRegressor(),n_features_to_select=None, step=1, verbose=2)    
r2_scorer = lambda est, features: r2_score(y_true=y_vol,y_pred=est.predict(X_allfeatures[:, features]))
rfe_vola._fit(X_allfeatures, y_vol, r2_scorer)
ranking_vola = rfe_vola.ranking_
</code></pre>

python scikit-learn iteration rfe