title: Question about Permutation Importance on LSTM Keras
body: <pre><code>from keras.wrappers.scikit_learn import KerasClassifier, KerasRegressor   
  import eli5
  from eli5.sklearn import PermutationImportance
  
  model = Sequential()
  model.add(LSTM(units=30,return_sequences= True, input_shape=(X.shape[1],421)))
  model.add(Dropout(rate=0.2))
  model.add(LSTM(units=30, return_sequences=True))
  model.add(LSTM(units=30))
  model.add(Dense(units=1, activation='relu'))
  
  perm = PermutationImportance(model, scoring='accuracy',random_state=1).fit(X, y, epochs=500, batch_size=8)
  eli5.show_weights(perm, feature_names = X.columns.tolist())
  </code></pre>
  <p>I am running an LSTM just to see the feature importance of my dataset containing 400+ features. I used the Keras scikit-learn wrapper to use eli5's PermutationImportance function. But the code is returning</p>
  <pre><code>ValueError: Found array with dim 3. Estimator expected &lt;= 2.
  </code></pre>
  <p>The code runs smoothly if I use <code>model.fit()</code> but can't debug the error of the permutation importance. Anyone know what is wrong?</p>