I am working on multi-label classification problem, binary case. As a target variable there are five columns with 0-1 values.
For a model training I use scikit-multilearn library. Below is my code for training a model with Binary Relevance and RandomForest.
parameters = [
{
'classifier': [RandomForestClassifier(random_state=42)],
'classifier__n_estimators': [50, 100, 200],
'classifier__max_features': ['auto', 'sqrt', 'log2'],
'classifier__max_depth' : [4, 6, 8, 10, 12],
'classifier__criterion' :['gini', 'entropy']}]
clf = RandomizedSearchCV(BinaryRelevance(), parameters, scoring='f1_weighted', cv=5, \
n_jobs=-1, verbose=10, random_state=10)
clf.fit(X_train, y_train)
How could I extract feature importance from the model? Should I take the best parameters from this model and then apply to data with each label separately using RandomForest from sklearn?