I am currently learning LSTM-RNN models and I have done some tests to see how they work. As in the most NN, overfitting and underfitting is a problem in ML. I have read articles such as this guy here: https://machinelearningmastery.com/learning-curves-for-diagnosing-machine-learning-model-performance/ this: https://towardsdatascience.com/learning-curve-to-identify-overfitting-underfitting-problems-133177f38df5 and this: Dealing with LSTM overfitting All of them are talking about detecting overfitting and underfitting using loss functions: train loss function and test/validation loss function. In papers around the google I see they are depicting plots of real datasets + prediction on trained datasets + prediction on unseen datasets. I haven't seen someone depicting loss functions. So, my question is how can I understand if a LSTM-RNN model works well and doesn't overfit/underfit from the plot of (real dataset + prediction on trained dataset + prediction on unseen dataset)?? Is it possible?
Identify overfitting from LSTM plot, from the prediction on trained+unseen data
loss-functionslstmoverfittingrecurrent neural network
Best Answer
For future readers: I clarified my understanding of the question in the comments.
EDIT: This answer is not specific to LSTM or neural networks, it is true for any predictive algorithm.
Response: In general, you probably can tell overfitting/underfitting from a single plot of true values (all, train and test) + training data predictions + testing data predictions. However, there are some pretty big issues with doing this, and I don't see why you wouldn't just use more objective methods.
How to do it from plot: It's pretty straightforward. You know that the definition of overfitting is that the model does much better in training than in test. Visually, from a plot, you will detect this by seeing that the model predictions match very closely with true values in the training set section of the plot, but are noticeably worse/farther away/messy-looking in the test set.
For underfitting, you will see in the plot that the predictions are bad/messy/far-away-from-true-values in both, the training set section of the plot and the test set section. As a general note, it is pretty unlikely that you are underfitting with a neural network.
The problems with doing that (please read!):
My recommendations:
Best of luck!