Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [overfitting]

For questions related to the concept of overfitting in machine learning, which can be loosely defined as the gap between the performance on the training set and the performance on the test set.

Filter by
Sorted by
Tagged with
0 votes
2 answers
615 views

How to avoid over-fitting using early stopping when using R cross validation package caret

I have a data set with 36 rows and 9 columns. I am trying to make a model to predict the 9th column I have tried modeling the data using a range of models using caret to perform cross-validation and ...
2 votes
2 answers
583 views

Unable to overfit using MLP

I'm building a 5-class classifier with a private dataset. Each data sample has 67 features and there are about 40000 samples. Samples of a particular class were duplicated to overcome class imbalance ...
0 votes
2 answers
291 views

How do you interpret this train vs test accuracy scores? is the model under or over fitting?

What does this difference in train and test accuracy mean?
1 vote
2 answers
790 views

Why do the training and validation loss curves diverge?

I was training a CNN model on TensorFlow. After a while I came back and saw this loss curve: The green curve is training loss and the gray one is validation loss. I know that before epoch 394 the ...
0 votes
1 answer
122 views

MobileNet validation loss not decreasing over time

I am trying to train a MobileNetV2 on a custom dataset, to image Classification task. Cardinality is 864 images, split in 70%/20%/10%, balanced between the 3 different classes. Weights are pre-loaded ...
0 votes
0 answers
30 views

Attention module (CBAM) in CNN tend to saturate values to 1

In the context of image classification, I am using a feature extractor based on a resnet-like architecture (ResNet12): four residual blocks, each of which is made of two consecutive conv3x3, batch ...
0 votes
2 answers
110 views

Why does model overfitting lead to poor generalization?

If a model overfit to the training data, why does it generalize poorly? Consider the basic problem of a noisy 2d dataset where I am fitting polynomials. A good model would be a parabola and a line ...
0 votes
0 answers
29 views

High Fluctuations in Validation Curve

Below I attach an image of accuracy curves. I got a lot of suggestions regarding some improvement in below curves. Following are my experiments in order to make the curve stable--> I used lr = 4....
10 votes
5 answers
1k views

Why can neural networks generalize at all?

Neural networks are incredibly good at learning functions. We know by the universal approximation theorem that, theoretically, they can take the form of almost any function - and in practice, they ...
0 votes
0 answers
8 views

How much is the acceptable percentage for Random Forest in Landslides prediction?

RF had been developed to overcome overfitting in decision trees but in some cases RF still experiences overfitting in landslide prediction, which varies from 2% to 12%. How much overfitting is ...
1 vote
0 answers
17 views

Failing to train and avoid overfit on noisy training data

I have added some Gaussian noise to CIFAR10 training and test set. I am using VGG16 and ResNet34 as the model to be used for training. Under normal training conditions, where the standard CIFAR10 is ...
1 vote
1 answer
144 views

How does deep learning overcome overfitting?

From Berkeley CS182, SP22: https://cs182sp22.github.io/assets/lecture_slides/2022.01.26-ml-review-pt2.pdf. Can someone help me interpret this diagram? I understand the graph on the left, but I don't ...
0 votes
1 answer
58 views

What are possible reasons for the validation loss increasing with more data?

I trained a neural network on an NLP problem and compared the loss and BLEU score on the validation data with the same training parameters in two scenarios: a) when I trained on 25% of the data, b) ...
6 votes
4 answers
1k views

Is k-fold cross-validation more effective than splitting the dataset into training and test datasets to prevent overfitting?

I want to prevent my model from overfitting. I think that k-fold cross-validation (because it is doing this each time with different datasets) may be more effective than splitting the dataset into ...
1 vote
0 answers
218 views

What is wrong with my PyTorch model training on CIFAR10?

I am training a ResNet model on CIFAR10 dataset. For the training subset, I selected a random 1% of the train data from the default train/test split. For the test subset I used the whole default test ...
0 votes
1 answer
219 views

Is it a good idea to overfit on a small part of your data for faster model convergence?

I working on a classification problem that needs to detect patterns on a time serie. Basically, there's a catch-all class that means "no pattern detected", the other are for the specific patterns. The ...
0 votes
1 answer
98 views

Does this look like overfitting?

I'm using a Decision Tree that gave me great test metrics. Then I checked the learning curve, but it seems a little strange to me regarding the training score. Do you think there is a problem with ...
7 votes
2 answers
6k views

How can I handle overfitting in reinforcement learning problems?

So this is my current result (loss and score per episode) of my RL model in a simple two players game: I use DQN with CNN as a policy and target networks. I train my model using Adam optimizer and ...
0 votes
2 answers
763 views

What should I do if my validation score is good, but my test score is bad?

I've trained my artificial neural network, and, as per standard practice, I've picked out the one neural network throughout training that did the best on my validation dataset. That is, the neural ...
0 votes
0 answers
20 views

How to speed up the learning process

I have built a network that performans pretty well on my data. The issue I have is that for a larger number of epochs at the start of the training process the val/train acc/loss are stagnating (for ...
1 vote
1 answer
118 views

fondamental question about regularization techniques to solve overfitting problem in neural networks

I have a text classification neural network based on BERT that overfits. The accuracy on the training dataset is 95%, whereas it is 68% on the validation dataset. Using some classical regularization ...
0 votes
1 answer
73 views

How do I know if my Random Forest Regressor Model is overfitted?

Im creating a Random Forest Regressor Model with a small dataset (30 data points). I tried with other models but RF was the best one, however, after applying GridSearchCv I got that the training set ...
5 votes
1 answer
193 views

Is running more epochs really a direct cause of overfitting?

I've seen some comments in online articles/tutorials or Stack Overflow questions which suggest that increasing the number of epochs can result in overfitting. But my intuition tells me that there ...
10 votes
1 answer
819 views

What is "early stopping" in machine learning?

What is early stopping in machine learning and, in general, artificial intelligence? What are the advantages of using this method? How does it help exactly? I'd be interested in perspectives and ...
7 votes
2 answers
799 views

Is there an argument against using the (reviewed) predictions of a model as ground truth to further train exactly this model?

I plan to use my predictions as ground truth to continue training my model. These predictions are of course reviewed during this process. Is there an argument against that (reinforcement of slight ...
3 votes
2 answers
146 views

When exactly am I overfitting -- contradicting metrics

I am training an object detection machine learning pipeline. Among the many metrics provided out of the box by tensorflow object detection API, I look at total_loss and DetectionBoxes_Precision/mAP@....
1 vote
0 answers
73 views

Why does the SVM perform poorly on test data that has a different class distribution than the training data?

Do you know why the SVM performs poorly on test data that has a different class distribution than the training data? The training data has around 15 classes, and the additional testing data has around ...
4 votes
2 answers
318 views

How does Regularization Reduce Overfitting?

As I understand, this is the general summary of the Regularization-Overfitting Problem: The classical "Bias-Variance Tradeoff" suggests that complicated models (i.e. models with more ...
5 votes
2 answers
8k views

Why did the L1/L2 regularization technique not improve my accuracy?

I am training a multilayer neural network with 146 samples (97 for the training set, 20 for the validation set, and 29 for the testing set). I am using: automatic differentiation, SGD method, fixed ...
7 votes
2 answers
764 views

How does rotating an image and adding new 'rotated classes' prevent overfitting?

From Meta-Learning with Memory-Augmented Neural Networks in section 4.1: To reduce the risk of overfitting, we performed data augmentation by randomly translating and rotating character images. We ...
6 votes
4 answers
1k views

Is it possible for a neural network to be used to compress data?

When training a neural network, we often run into the issue of overfitting. However, is it possible to put overfitting to use? Basically, my idea is, instead of storing a large dataset in a database, ...
4 votes
1 answer
110 views

Is there a way to ensure that my model is able to recognize an unseen example?

My question is more theoretical than practical. Let's say that I am training my cat classifier with a dataset that I feel is pretty representative of cat images in general. But then a new breed of cat ...
3 votes
1 answer
284 views

Can neural networks learn noise?

I'm interested in the following graphs. A neural network was trained to recognise digits from the MNIST dataset and then the labels were randomly shuffled and the following behaviour was observed. ...
0 votes
2 answers
164 views

Validation set performance increasing even after seemingly overfit on training set

I am training a semi-supervised GAN network using data from multiple subjects. I separated the labeled and unlabeled data based on my subjects, so there is no leakage, while having much more unlabeled ...
8 votes
3 answers
10k views

How should we regularize an LSTM model?

There are five parameters from an LSTM layer for regularization if I am correct. To deal with overfitting, I would start with reducing the layers reducing the hidden units Applying dropout or ...
2 votes
0 answers
21 views

2-stage model overfitting

I'm trying to build an entity matching model. There are 2 kinds of features - binary (0/1) and text features. Initially I made a deep learning model that uses character level embeddings of some of the ...
0 votes
0 answers
105 views

What can cause massive instability in validation loss?

I'm working with very weird data that is apparently very hard to fit. And I've noticed a very strange phenomenon where it can go from roughly 0.0176 validation MSE to 1534863.6250 validation MSE in ...
2 votes
1 answer
670 views

Does a bigger neural network learn "worse" representations than a small neural network when the amount of data isn't enough?

Assume we have a neural network and we want to train it on a classification problem. The hidden layers of the neural network are kind of feature representations of the input data. If the neural ...
12 votes
4 answers
6k views

Is overfitting always a bad thing?

DNN can be used to recognize pictures. Great. For that usage, it's better if they are somewhat flexible so as to recognize as cats even cats that are not on the pictures on which they trained (i.e. ...
1 vote
1 answer
856 views

Is this LSTM model underfitting?

I think this model is underfitting. Is this correct? ...
0 votes
0 answers
570 views

Why is BatchNormalization causing severe overfitting to my data?

So I've been making a mini version of VGGNet, trying to tweak the hyperparameters to match the CIFAR-100 dataset. It was running slow at first but I was able to get decent accuracy after 60 epochs or ...
1 vote
1 answer
1k views

What does it mean by overfitting the test set?

Consider the following statement from p14 of Naive Bayes and Sentiment Classification While the use of a devset avoids overfitting the test set, having a fixed training set, devset, and test set ...
2 votes
1 answer
2k views

Should I continue training if the neural network attains 100% training accuracy?

I have a neural network where there are two hidden layers. Each hidden layer has 128 neurons. The input layer has 20 inputs, and the output layer has 3 outputs. I have 1 million records of data. 80% ...
1 vote
1 answer
53 views

What are the 'noisy factors' leading to overfitting?

Consider the following excerpt from section 5.5 Regularization (p. 13) of this chapter Logistic Regression. There is a problem with learning weights that make the model perfectly match the training ...
7 votes
1 answer
444 views

What is the best measure for detecting overfitting?

I wanted to ask about the methodology of testing the ML models against overfitting. Please note that I don't mean any overfitting reducing methods like regularisation, just a measure to judge whether ...
0 votes
1 answer
454 views

Is it possible to overfit a model on infinite amounts of data?

This is a theoretical question. Is it possible to overfit a model on infinite amounts of data? Let me clarify there are no duplicates. Say, we have a generator function that produces data, with the ...
2 votes
1 answer
91 views

Why are large models necessary when we have a limited number of training examples?

In Goodfellow et al. book Deep Learning chapter 12.1.4 they write These large models learn some function $f(x)$, but do so using many more parameters than are necessary for the task. Their size is ...
0 votes
0 answers
104 views

Identifying if a model is over or under-fitting via graphs

I am working on a Neural Network and have plotted the performance of my model. However the plots seem not to fit the "trends" (which help you identify the issue with your model) presented in ...
0 votes
2 answers
976 views

Do larger numbers of hidden layers have a bigger effect on a classification model's accuracy?

I trained different classification models using Keras with different numbers of hidden layers and the same number of neurons in each layer. What I found was the accuracy of the models decreased as the ...
1 vote
0 answers
51 views

How does the loss landscape look like or change when a model is overfitting?

My understanding is that when a model starts overfitting, it no longer learns useful features and starts remembering the training data set. Given enough epochs and sufficient parameters, a model can ...