scikit-learn-contrib / boruta_py

Python implementations of the Boruta all-relevant feature selection method.
BSD 3-Clause "New" or "Revised" License
1.46k stars 252 forks source link

Problem with sklearn.ensemble.LogisticRegression() #86

Open malmashhadani opened 3 years ago

malmashhadani commented 3 years ago

When I run the feat_selector = BorutaPy(LRmodel, n_estimators='auto', verbose=2) then I run: feat_selector.fit(training_data.drop(columns=['LeadID','Enrolled_flag','CreateDate','LeadPrice']), training_data.Enrolled_flag)

I get the error

depth = self.estimator.get_params()['max_depth']

KeyError: 'max_depth'
JosAndr commented 3 years ago

Logistic regression don't have "max_depth" as parameter, im not sure but i htink thaht boruta is not intended for use LR as estimator, the original algorithm is based on random forest