Questions tagged [overfitting-underfitting]

143 questions
1
vote
0 answers

How to do k-fold cross validation and use the model to predict unseen data?

I have a model whose training accuracy is 95-100 % and I believe there is overfitting. So, I want to avoid overfitting in my model. One way to avoid overfitting is to do k-fold cross-validation. So, while performing cross-validation there are…
1
vote
0 answers

Tuning underfit catboost regressor model with fixed training set

I'm currently using CatboostRegressor(iterations=500, random_seed=123, cat_features=['month_number', 'day_of_week', 'year']) for developing a 1-year predictive model at a daily level. The predictor variables are time feature date, categorical…
user177196
  • 738
  • 1
  • 8
  • 16
1
vote
0 answers

Example of KNN overfitting with low K

I know that with k=1 a KNN lead to overfitting, this is because it follows the noisy data of the training sample and not generalize well on new input sample. But I am confused on how this happens, I understand the graphics but cant't figure out an…
1
vote
0 answers

k-fold implementation with train test split

I am trying to put kfold to my code as overfitting is an issue. Previously i have split my data into train test . But i am getting confused where and how to apply k-fold as my data is already split. x_norm = preprocessing.normalize(x,…
1
vote
2 answers

How to check if my model is overfitting or not when training with many epochs

I'm training my tensorflow model with 100 epochs. history = model.fit(..., steps_per_epoch=600, ..., epochs=100, ...) Here is the output when training on 7/100: Epoch 1/100 600/600 [==============================] - ETA: 0s - loss: 0.1443 - rmse:…
stackbiz
  • 1,136
  • 1
  • 5
  • 22
1
vote
1 answer

how to overfit a model on a single batch in keras?

I am trying to overfit my model on a single batch to check model integrity. I am using Keras and TensorFlow for the implementation of my model and coding style for this project. I know how to get the single batch and overfit the model in PyTorch but…
1
vote
0 answers

Training Loss decreasing but Validation Loss is stable

I am trying to train a neural network I took from this paper https://scholarworks.rit.edu/cgi/viewcontent.cgi?referer=&httpsredir=1&article=10455&context=theses. See this image: Neural Network Architechture I am using pytorch-lightning to use…
1
vote
1 answer

Why this model can't overfit one example?

I am practicing conv1D on TensorFlow 2.7, and I am checking a decoder I developed by checking if it will overfit one example. The model doesn't learn when trained on only one example and can't overfit this one example. I want to understand this…
1
vote
0 answers

How to add dropout in CNN and LSTM architecture to handle overfitting problem, TensorFlow

My network architecture is the combination of 7 layers of CNN and 2 layers of BiLSTM, when i trained my model it shows overfitting, one of the solution to deal with this problem is Dropout in the architecture. How we can add dropout in this network…
1
vote
0 answers

Tuning max_depth in Random Forest using CARET

I'm building a Random Forest with Caret package on R with method = "rf". I see that every type of random forest on caret seems only tune mtry which is the number of features selected randomly for each tree. I do not understand why max_depth of each…
1
vote
1 answer

gridsearchCV - shuffle data for every single parameter combination

I am using gridsearchCV to determine model hyper-parameters: pipe = Pipeline(steps=[(self.FE, FE_algorithm), (self.CA, Class_algorithm)]) param_grid = {**FE_grid, **CA_grid} scorer = make_scorer(f1_score, average='macro') search =…
1
vote
1 answer

Tensorflow object detection API overfitting

I am creating tree detector using Tensoflow Object Detection API with the help of following tutorial : https://www.youtube.com/watch?v=a1br6gW-8Ss My problem is that the model is overfitting the training set. How can I avoid it ? My training set is…
1
vote
0 answers

Learning curves for multiclass classification

I am working on a multiclass classification problem. I want to know whether my model is overfitting or underfitting. I am learning how to plot learning curves. My question is, is the order of steps I have done correct? Scaling Baseline…
1
vote
1 answer

Perfect scores in multiclassclassification?

I am working on a multiclass classification problem with 3 (1, 2, 3) classes being perfectly distributed. (70 instances of each class resulting in (210, 8) dataframe). Now my data has all the 3 classes distributed in order i.e first 70 instances are…
1
vote
2 answers

Training Accuracy Increasing but Validation Accuracy Remains as Chance of Each Class (1/number of classes)

I am training a classifier using CNNs in Pytorch. My classifier has 6 labels. There are 700 training images for each label and 10 validation images for each label. The batch size is 10 and the learning rate is 0.000001. Each class has 16.7% of the…
1
2
3
9 10