Trouble performing feature selection using boruta and support vector regression
I was trying to select the most important features of a data set using Boruta in python. I have split the data into training and test set. Then I used SVM regressor to fit the data. Then I used Boruta to measure feature importance.The code is as follows:
from sklearn.svm import SVR
svclassifier = SVR(kernel='rbf',C=1e4, gamma=0.1)
svm_model= svclassifier.fit(x_train, y_train)
from boruta import BorutaPy
feat_selector = BorutaPy(svclassifier, n_estimators='auto', verbose=2, random_state=1)
feat_selector.fit(x_train, y_train)
feat_selector.support_
feat_selector.ranking_
X_filtered = feat_selector.transform(x_train)
But I get this error KeyError: 'max_depth'
.
What might be causing this error?
Does Boruta work with any kind of models? i.e linear models, tree-based models, neural nets, etc.?
Topic boruta svr feature-selection python
Category Data Science