I want to know feature importance for the same reason i want to give my model as input to permutation_importance( ) function, which wants model to give output as 0 or 1 only.
My dataset outcome is binary, I want Output of ANN to be either 0 or 1, but i am getting probabilities in the range 0 to 1.
I tried to customise step activation function for output layer , but not much luck.
This is my ANN
model = keras.models.Sequential() model.add(keras.layers.Dense(32,input_dim=a,activation='relu')) ## input layer(8 neurons) --> hidden layer(32) model.add(keras.layers.Dropout(0.2)) model.add(keras.layers.Dense(64,activation="relu")) ## second hidden layer model.add(keras.layers.Dropout(0.2)) model.add(keras.layers.Dense(2,activation="softmax")) ## output layer
model.compile(loss="binary_crossentropy",optimizer='adam',metrics=["accuracy"])
Kindly suggest how can i get output as 0 or 1 for this ANN