1
$\begingroup$

Machine Learning call volume prediction using LSTM and GRU I am trying to predict the number of incoming calls using LSTM and GRU I have done all the data preprocessing but upon training the model I getting 0.0 accuracy

what could be the the problem

model_lstm = Sequential()

model_lstm.add(LSTM(100, input_shape=(X_train_seq.shape[1], X_train_seq.shape[2]))) # Input layer + 1st hidden layer #

model_lstm.add(tf.keras.layers.Dense(10, activation='relu')) # 2nd hidden layer #

model_lstm.add(tf.keras.layers.Dense(5, activation='relu')) # 3rd hidden layer

model_lstm.add(tf.keras.layers.Dense(1)) # Output layer

model_lstm.compile(optimizer='Adam', loss='mae', metrics=['accuracy'])

lstm_history = model_lstm.fit(X_train_seq, y_train_seq, epochs=10, batch_size=10, validation_data=(X_test_seq, y_test_seq))
Epoch 1/10 687/687 [==============================] - 73s 106ms/step - loss: 0.0103 - accuracy: 0.0000e+00 - val_loss: 0.0097 - val_accuracy: 0.0000e+00
Epoch 2/10 687/687 [==============================] - 79s 116ms/step - loss: 0.0100 - accuracy: 0.0000e+00 - val_loss: 0.0107 - val_accuracy: 0.0000e+00
Epoch 3/10 687/687 [==============================] - 78s 114ms/step - loss: 0.0099 - accuracy: 0.0000e+00 - val_loss: 0.0092 - val_accuracy: 0.0000e+00
Epoch 4/10 687/687 [==============================] - 79s 115ms/step - loss: 0.0098 - accuracy: 0.0000e+00 - val_loss: 0.0091 - val_accuracy: 0.0000e+00
Epoch 5/10 687/687 [==============================] - 80s 116ms/step - loss: 0.0097 - accuracy: 0.0000e+00 - val_loss: 0.0091 - val_accuracy: 0.0000e+00
Epoch 6/10 687/687 [==============================] - 80s 116ms/step - loss: 0.0097 - accuracy: 0.0000e+00 - val_loss: 0.0091 - val_accuracy: 0.0000e+00
Epoch 7/10 687/687 [==============================] - 80s 116ms/step - loss: 0.0096 - accuracy: 0.0000e+00 - val_loss: 0.0090 - val_accuracy: 0.0000e+00
Epoch 8/10 687/687 [==============================] - 81s 118ms/step - loss: 0.0095 - accuracy: 0.0000e+00 - val_loss: 0.0090 - val_accuracy: 0.0000e+00
Epoch 9/10 556/687 [=======================>……] - ETA: 13s - loss: 0.0095 - accuracy: 0.0000e+00
$\endgroup$
0

1 Answer 1

1
$\begingroup$

The problem is that you are using accuracy as a metric for a regression problem, but accuracy is actually meant for classification, not regression.

You can check the Keras docs for metrics that are appropriate for regression, including mse or mae.

$\endgroup$
1
  • $\begingroup$ Hi @Noe thank you duly noted and much appreaciated $\endgroup$ Commented Apr 15 at 12:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.