[scikit-learn] RFE/RFECV parameter suggestion

Sebastian Raschka se.raschka at gmail.com
Sun Apr 30 17:50:06 EDT 2017


For RFECV, I think that a min_features parameter could be useful. 

Alternatively, making XGBoost more scikit-learn compatible instead of making scikit-learn more XGBoost compatible could be another take on this.

Best,
Sebastian

> On Apr 30, 2017, at 3:13 PM, George Fisher <george at georgefisher.com> wrote:
> 
> I found that xgboost generates an exception under RFECV when the number of features remaining falls below 3. I fixed this for myself by adding a 'stop_at' parameter (default=1) that stops the process in RFE when the remaining features falls below this number. I think it might be a useful feature more broadly than simply as a hacked work-around so I offer it as a pull request.
> 
> George Fisher
> george at georgefisher.com
> +1 917-514-8204
> https://github.com/grfiv
> 
> Ubuntu 17.04 Desktop
> Python 3.5.3
> IPython 6.0.0
> sklearn 0.18.1
> (xgboost 0.6)
> _______________________________________________
> scikit-learn mailing list
> scikit-learn at python.org
> https://mail.python.org/mailman/listinfo/scikit-learn



More information about the scikit-learn mailing list