Is there any way to get variable importance with Keras?

*Edited to include relevant code to implement permutation importance. I answered a similar question at Feature Importance Chart in neural network using Keras in Python. It does implement what Teque5 mentioned above, namely shuffling the variable among your sample or permutation importance using the ELI5 package. from keras.wrappers.scikit_learn import KerasClassifier, KerasRegressor import eli5 from eli5.sklearn … Read more

ImportError: cannot import name ‘_obtain_input_shape’ from keras

You don’t have to downgrade Keras 2.2.2. In Keras 2.2.2 there is no _obtain_input_shape method in the keras.applications.imagenet_utils module. You can find it under keras-applications with the modul name keras_applications (underscore). So you don’t have to downgrade your Keras to 2.2.0 just change: from keras.applications.imagenet_utils import _obtain_input_shape to from keras_applications.imagenet_utils import _obtain_input_shape

Keras: weighted binary crossentropy

Normally, the minority class will have a higher class weight. It’ll be better to use one_weight=0.89, zero_weight=0.11 (btw, you can use class_weight={0: 0.11, 1: 0.89}, as suggested in the comment). Under class imbalance, your model is seeing much more zeros than ones. It will also learn to predict more zeros than ones because the training … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)