In the accuracy graphs (attached the graph images below) shown in this code (Binary Classification for Fraud Detection):

  1. validation loss is greater than training loss
  2. training accuracy is greater than validation accuracy

Does that not mean that the model is overfitting? How to avoid that overfitting?

Accuracy Loss


1 Answer 1


First, it is useful to realize that your question is about statistical learning and not quantum computing. Your question better fits the Cross Validated stack.

But since your code contains a tiny bit of quantum computation along with a classical neural network I give a brief answer.

This plot doesn't say anything except that the current random split of data into training and validation sets produces a validation error slightly higher than the training error. Nothing wrong with it.

Purely by chance, the overall dataset may be split so that a bad model may produce a good validation score or vice versa. This means that a single split of data really doesn't say much about the performance of a model. What actually needs to be done is to gather various training and validation statistics over multiple data splits. This is usually achieved by the means of well-known methods such as cross-validation or even bootstrapping. Only once you consider statistics given by the aforementioned procedures you will be able to tell if your final choice model overfits.


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.