How do I extract the best features when using BayesSearchCV?

453 Views Asked by At

When using BayesSearchCV from Skopt for Feature Selection, how can I extract the feature names of the optimal set of features? I only know how to get the number of features together with other hyperparameters but am unable to find how to get the names of these optimal features.

1

There are 1 best solutions below

0
On

According to the documentation you can access this by calling

opt.best_params_

https://scikit-optimize.github.io/stable/modules/generated/skopt.BayesSearchCV.html#skopt.BayesSearchCV