Questions tagged [cross-validation]

For questions related to the cross-validation techniques (e.g. k-fold cross-validation or leave-one-out cross-validation) used in machine learning to assess the quality (e.g. average accuracy) of the models.

Filter by
Sorted by
Tagged with
0 votes
0 answers
13 views

Preventing Overfitting While Cross Validating Time Series Models

I have some time series data (e.g. daily rainfall for 10 years) and I am interested in fitting a time series model to this data and record the error. I want to use the "rolling window cross ...
0 votes
1 answer
14 views

Training model after Cross Validation: train one of the *k* split models plus the remaining data, or train from scratch?

So after a, say, 5-fold CV, you are left with 5 models, each trained on 80% of the data. You now want to have the best model possible, i.e. train it on all data. In order to save computation time, can ...
0 votes
0 answers
8 views

Is it recommend to perform a time series analysis with a fixed set of validation data?

I'm currently working on a project in material science and the data to evaluate is very limited. I work with about 60 datasets, each with about 10.000 relevant lines. However I want to predict a ...
1 vote
1 answer
59 views

What is a result of a cross validation process?

I am trying to determine the result of a cross validation process. Is it just a set of standalone models which is produced after each cross-validation round, or is there some kind of final model which ...
  • 159
0 votes
0 answers
21 views

Does lazy learning require train-test-validation split?

This is a follow-up question to another post on SE AI that asked to distinguish lazy and eager learning. One answer said that lazy learners do not require training and do all of the computation ...
0 votes
0 answers
22 views

How can validation accuracy be more than test accuracy?

I have been trying to implement DenseNet on small dataset using k-fold cross validation. Training accuracy is 94% ,validation accuracy is 73% whereas test accuracy is 90%.I have taken 10% of my total ...
  • 13
0 votes
0 answers
74 views

Combining fine-tuning BERT and cross validation for hyperparameter selections

Is it possible to combine cross-validation procedure and hyper-parameter tuning for fine-tuning bert for a classification task? The idea is the following: Choose a set of set of hyperparameters {H,H1,...
  • 101
0 votes
0 answers
17 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 ...
0 votes
0 answers
55 views

uniform gap between training and validation metrics

I am training a neural network (Deep and cross network) for a multi-label classification task (~700 labels). I have around 2.5 million samples, splitted 8/1/1 for train/test/validation. I am seeing a ...
  • 121
0 votes
1 answer
54 views

Cross Validation and hyperparameter selection correct procedure

I am trying to run a regression supervised learning problem. The dataset is not very large and I wanted to do some cross-validation to avoid overfitting. As I have read it's important to do a ...
  • 1
0 votes
0 answers
18 views

What are "volatile" learning curves indicative of?

I have a dataset set with ~40 features onto which I'm applying a multi-layer perceptron for regression purposes. The train, validation, and test sets are made up of 3M, 800K, and 800K examples each, ...
  • 177
0 votes
1 answer
377 views

Weights initialization once the Neural Network is trained

I am trying to understand how weights are initialized in a Neural Network using Keras deep learning framework and what happens if I train a Neural Network and then I want to train it again: are the ...
0 votes
1 answer
64 views

Given a dataset of people with and without cancer, should I split it into training and test datasets such that the same person is not in both?

I have a database that contains healthy persons and lung cancer patients. I need to design a deep neural network for the binary classification problem (cancer/no cancer). I need to split the dataset ...
  • 111
0 votes
1 answer
128 views

How to arrange test dataset distribution for an imbalanced classification problem?

I have a dataset that contains 560 datapoints, and I would like to do binary classification on it. 400 datapoints belong to class 1, and 160 points belong to class 2. In the case of an imbalanced ...
  • 11
5 votes
1 answer
706 views

How to decide a train-test split?

In almost every ML model, a train-test (or train-test-val split) is critical to assess the model's performance. However, I have always wondered what the rationale is to decide a particular train-test ...
user avatar
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% ...
0 votes
1 answer
495 views

Is it valid to implement hyper-parameter tuning and THEN cross-validation?

I have a multi-label classification task I am solving. I have done hyperparameter tuning (with Keras Tuner) to determine the best configuration for my neural network. Is it valid to do this (determine ...
1 vote
1 answer
50 views

Why is the validation loss less than the training loss, and what can be said about the effect of the learning rate?

I have the following results I am trying to make sense of. I have attached the loss curves here for reference. As you can see, the first issue is that the validation loss is lower than the training ...
  • 113
3 votes
1 answer
95 views

Does adding a model complexity penalty to the loss function allow you to skip cross-validation?

It's my understanding that selecting for small models, i.e. having a multi-objective function where you're optimizing for both model accuracy and simplicity, automatically takes care of the danger of ...
  • 33
1 vote
1 answer
263 views

How to fill NaNs in Cross-Validation?

I have been searching this but did not find the answer, so sorry if this is a duplicated question. I was working with cross-validation, where some doubts came to my mind, and I am not sure which is ...
  • 11
0 votes
2 answers
475 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
1 answer
60 views

How exactly does nested cross-validation work?

I have trouble understanding how nested cross-validation works - I understand the need for two loops (one for selecting the model, and another for training the selected model), but why are they nested?...
1 vote
1 answer
322 views

Is my 57% sports betting accuracy correct?

I have been creating sports betting algorithms for many years using Microsoft access and I am transitioning to the ML world and trying to get a grasp on determining the success of my algorithms. I ...
3 votes
2 answers
134 views

Calculating accuracy for cross validation

I'm struggling with calculating accuracy when I do cross-validation for a deep learning model. I have two candidates for doing this. 1. Train a model with 10 different folds and get the best accuracy ...
  • 31
0 votes
1 answer
80 views

What are non-held-out data or non-held-out classes?

I'm Spanish and I don't understand the meaning of "non-held-out". I have tried Google Translator and online dictionaries like Longman but I can't find a suitable translation for this term. You can ...
2 votes
1 answer
91 views

After having selected the best model with cross-validation, for how long should I train it?

When using k-fold cross-validation in a deep learning problem, after you have computed your hyper-parameters, how do you decide how long to train your final model? My understanding is that, after the ...
1 vote
1 answer
63 views

What is the theoretical basis for the use of a validation set?

Let's say we use an MLE estimator (implementation doesn't matter) and we have a training set. We assume that we have sampled the training set from a Gaussian distribution $\mathcal N(\mu, \sigma^2)$. ...
user avatar
1 vote
1 answer
94 views

How to fairly conduct a model performance with 5-fold cross validation after augmentation?

I have, say, a (balanced) data-set with 2k images for binary classification. What I have done is that randomly divided the data-set into 5 folds; copy-pasted all 5-fold data-set to have 5 exact ...
1 vote
3 answers
545 views

While we split data in training and test data, why we have two pairs of each?

Why do we split the data into two parts, and then split those segments into training and testing data? Why do we have two sets of data for each training and test data?
  • 31
3 votes
2 answers
587 views

Should I choose the model with highest validation accuracy or the model with highest mean of training and validation accuracy?

I'm training a deep network in Keras on some images for a binary classification (I have around 12K images). Once in a while, I collect some false positives and add ...
  • 973
1 vote
0 answers
64 views

How can I split the data into training and validation sets such that entries with a certain value are kept together?

I have the following kind of data frame. These are just example: A 1 Normal A 2 Normal A 3 Stress B 1 Normal B 2 Stress B 3 Stress C 1 Normal C 2 Normal C 3 Normal ...
3 votes
1 answer
451 views

What is the relationship between the training accuracy and validation accuracy?

During model training, I noticed various behaviour in between training and validation accuracy. I understand that 'The training set is used to train the model, while the validation set is only used to ...
2 votes
3 answers
213 views

How do you interpret this learning curve?

Loss is MSE; orange is validation loss, blue training loss. The task is NN regression (18 inputs, 2 outputs), one layer 300 hidden units. Tuning the lr, mom, l2 regularization parameters this is the ...
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 ...
2 votes
1 answer
26 views

Can we say: the more we increase the numbers of cross validation the less likely it is that we overfit?

Based on the answer of my previous question: How can I avoid overfitting when doing parameter tuning? Can we say: the more we increase the numbers K of cross validation the less likely it is that we ...
0 votes
1 answer
89 views

How to interpret this learning curve plot

Bellow I have a Learning Curve plot How should I interpret this plot for my random forrest algorithm (the second one the most complex one)? Which one is the best?
1 vote
1 answer
77 views

How should I interpret this validation plot?

Bellow I have a validation plot How should I interpret this validation plot? Is my data underfitting? What else can be seen from this? Which one is the best? What does it mean that the right line is ...
15 votes
1 answer
305 views

Will parameter sweeping on one split of data followed by cross validation discover the right hyperparameters?

Let's call our dataset splits train/test/evaluate. We're in a situation where we require months of data. So we prefer to use the evaluation dataset as infrequently as possible to avoid polluting our ...
7 votes
1 answer
301 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 ...
  • 1,240
2 votes
1 answer
54 views

Metrics for evaluating models that output probabilities

I'm aware of metrics like accuracy (correct predictions / total predictions) for models that classify things. However, I'm working on a model that outputs the probability of a datapoint belonging to ...
  • 21
2 votes
2 answers
62 views

Ideal score of a model on training and cross validation data

The question is little bit broad, but I could not find any concrete explanation anywhere, hence decided to ask the experts here. I have trained a classifier model for binary classification task. Now ...
3 votes
1 answer
789 views

Should I use leave-one-out cross-validation for testing?

I am currently working with a small dataset of 20x300. Since I have so few data points, I was wondering if I could use an approach similar to leave-one-out cross-validation but for testing. Here's ...
1 vote
2 answers
200 views

Which model is better given their training and validation errors?

Below you have the plots of the training and validation errors for two different models. Both plots show the RMSE values for the validation dataset versus the number of training epochs. It is observed ...
0 votes
1 answer
567 views

Should I call the error "validation error" or "test error" during cross validation?

I'm using 10-fold cross validation on all models. Here you can see both plots: Since I am using k-fold cross validation, is it okay to name it "validation error vs training error" or "test error vs ...
2 votes
1 answer
345 views

What is the difference between validation percentage and batch size?

I'm doing transfer learning using Inception on Tensorflow. The code that I used for training is https://raw.githubusercontent.com/tensorflow/hub/master/examples/image_retraining/retrain.py If you take ...
  • 205
4 votes
1 answer
145 views

What are "development test sets" used for?

This is a theoretical question. I am a newbie to artificial intelligence and machine learning, and the more I read the more I like this. So far, I have been reading about the evaluation of language ...