Skip to content
Advertisement

RFE from scikit-learn feature_selection with NegativeBinomial from statsmodels as estimator

I’m trying to use RFE from scikit-learn with an estimator from statsmodels NegativeBinomial.

So I created my own class:

JavaScript

But I get this error:

JavaScript

Does someone has an idea?

Advertisement

Answer

You can modify your code to require endog and exog variables, instead of using the formula API:

JavaScript
User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement