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
0answers
12 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 ...
0
votes
0answers
9 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 ...
0
votes
1answer
49 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 ...
0
votes
1answer
29 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 ...
5
votes
1answer
136 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 ...
2
votes
1answer
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% ...
0
votes
1answer
41 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
1answer
36 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 ...
3
votes
1answer
34 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 ...
1
vote
1answer
155 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 ...
0
votes
2answers
276 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
1answer
48 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
1answer
181 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
2answers
72 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 ...
0
votes
1answer
67 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
1answer
60 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
1answer
59 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)$. ...
1
vote
1answer
87 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
3answers
89 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?
3
votes
2answers
187 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 ...
1
vote
0answers
59 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
1answer
210 views

Relationship between 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
3answers
171 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
3answers
661 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
1answer
21 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
1answer
72 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
1answer
69 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 ...
14
votes
1answer
220 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
1answer
201 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 ...
2
votes
1answer
53 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 ...
2
votes
2answers
51 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 ...
2
votes
1answer
319 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
2answers
169 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
1answer
59 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
1answer
208 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 ...
4
votes
1answer
77 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 ...