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
11 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, ...
user avatar
  • 167
0 votes
0 answers
5 views

Cross-validation using when using the Gaussian Naive Bayes model

Well, I am trying to solve this clustering problem that involves the Gaussian Naive-Bayes algorithm. Question: Classification Consider the data in the file - link below. Train the algorithm Gaussian ...
user avatar
  • 1
0 votes
1 answer
105 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 ...
user avatar
0 votes
0 answers
13 views

Does it make sense to get best Kth-fold CV test result from an epoch where train result is bad?

I have been looking for some explanation that could convince me over the right way of thinking about CV. My challenge is related to the automation of the model configuration process due to same kind ...
user avatar
  • 1
0 votes
0 answers
10 views

Is the average accuracy of each class (computed from the confusion matrix) equal to the accuracy calculated from cross-validation?

When I calculate the accuracy using cross-validation, it gives me a different accuracy than when I calculate using the confusion matrix. Why does it give a different accuracy? Is the accuracy ...
user avatar
  • 1
0 votes
1 answer
56 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 ...
user avatar
  • 105
0 votes
1 answer
32 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 ...
user avatar
  • 11
5 votes
1 answer
332 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
1k 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% ...
user avatar
0 votes
1 answer
118 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 ...
user avatar
1 vote
1 answer
39 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 ...
user avatar
  • 113
3 votes
1 answer
54 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 ...
user avatar
  • 33
1 vote
1 answer
186 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 ...
user avatar
  • 11
0 votes
2 answers
355 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 ...
user avatar
2 votes
1 answer
50 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?...
user avatar
1 vote
1 answer
229 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 ...
user avatar
3 votes
2 answers
81 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 ...
user avatar
  • 31
0 votes
1 answer
72 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 ...
user avatar
2 votes
1 answer
65 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 ...
user avatar
1 vote
1 answer
61 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
90 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 ...
user avatar
1 vote
3 answers
206 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?
user avatar
  • 31
3 votes
2 answers
285 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 ...
user avatar
  • 963
1 vote
0 answers
61 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 ...
user avatar
3 votes
1 answer
318 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 ...
user avatar
2 votes
3 answers
188 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 ...
user avatar
6 votes
3 answers
826 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 ...
user avatar
2 votes
1 answer
23 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 ...
user avatar
0 votes
1 answer
79 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?
user avatar
1 vote
1 answer
72 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 ...
user avatar
14 votes
1 answer
248 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 ...
user avatar
7 votes
1 answer
237 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 ...
user avatar
  • 1,039
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 ...
user avatar
  • 21
2 votes
2 answers
54 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 ...
user avatar
3 votes
1 answer
517 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 ...
user avatar
1 vote
2 answers
181 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 ...
user avatar
0 votes
1 answer
92 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 ...
user avatar
2 votes
1 answer
232 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 ...
user avatar
  • 195
4 votes
1 answer
86 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 ...
user avatar