Answers.Body: <p>Are you talking about (X_train,y_train) and (X_test,y_test).
  If yes, then X represents the data(features) and y represents the labels of that data. That's why you get a pair when you divide it into training and test data</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-02-12T17:12:06.907Z
Answers.LastActivityDate: 2020-02-12T17:12:06.907Z
Answers.UserDisplayName: Atul Grover
Answers.Body: <p>For any Machine Learning model, the available data is usually split into three sets:</p>
  <p><strong>Training Set:</strong></p>
  <p>The part of data used to train the model and learn the parameters of the network.</p>
  <p>The data that remains after allocation of the Training Dataset, is split into the Validation and Test sets.</p>
  <p><strong>Validation Set:</strong></p>
  <p>This sample of data is used to provide an unbiased evaluation of a model fit on the training dataset. This helps in tuning model hyperparameters to improve the model performance. Eg: Changing the number of clusters (<span class="math-container">$k$</span>) in a K-Means algorithm, or the pooling layers in a CNN.</p>
  <p><strong>Test Set:</strong></p>
  <p>After training, this part of the dataset is used to used to test how well the model generalizes to unseen data and estimate its performance.</p>
  <p>Another possibility (going by your question), is the use of <strong>Cross-Validation</strong>. This is performed when the dataset is too small.  In such a case, a random split is performed on the dataset resulting in k non-overlapping subsets. The test error is then estimated by taking the average test error across k trials.
  <a href="https://i.sstatic.net/IqYBM.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/IqYBM.png" alt="kFold" /></a>
  <a href="https://en.wikipedia.org/wiki/Cross-validation_(statistics)" rel="nofollow noreferrer">[Image Source]</a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-02-07T13:38:52.347Z
Answers.Text: You're not answering the question "While we split data in training and test data, _why we have to pairs of each?_" or addressing the confusion completely. The OP thinks that both the training and test datasets are again divided into two chunks.
Answers.UserDisplayName: nbro
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-02-07T13:59:42.990Z
Answers.Text: As far as I know, I have never come across a scenario where such a split has been used. I clarified his doubt by answering the general approach to splitting a dataset (without explicitly hinting at the fact that he might have a misconception). If you are aware of a case where such a splitting condition is used, you are free to elucidate on it.
Answers.UserDisplayName: s_bh
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-02-07T12:02:57.763Z
Answers.LastActivityDate: 2020-02-07T12:36:29.177Z
Answers.LastEditDate: 2020-06-17T09:57:20.710Z
Answers.UserDisplayName: s_bh
Answers.Body: <p>Usually we are splinting the data into 3 chunks for example 70% for training, 10% for validation and 20% for testing. The first two chunks are going to be used for training. The reason you need the validation dataset is to tune your hyper-parameters and see how well your model can generalize. Once you have a model that achieves a fairly good performance on the validation dataset, you're measuring its accuracy on the test dataset. </p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-02-07T13:39:25.207Z
Answers.Text: You're not answering the question "While we split data in training and test data, _why we have to pairs of each?_" or addressing the confusion completely. The OP thinks that both the training and test datasets are again divided into two chunks.
Answers.UserDisplayName: nbro
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-02-09T13:42:35.040Z
Answers.Text: Btw, I didn't downvote this answer and I am not sure why someone would.
Answers.UserDisplayName: nbro
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-02-07T11:58:34.763Z
Answers.LastActivityDate: 2020-02-07T11:58:34.763Z
Answers.UserDisplayName: razvanc92
Body: <p>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?</p>
  
Tags: <machine-learning><training><cross-validation>
Title: While we split data in training and test data, why we have two pairs of each?
UserDisplayName: ana
ThreadText: # While we split data in training and test data, why we have two pairs of each?
  
  (Asked by: username_0 on 2020-02-07)
  
  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?
  
  **Tags:** machine-learning, training, cross-validation
  
  
  ---
  
  ## 3 answers
  
  ### Answer by username_1 on 2020-02-12. Score: 1 | Accepted answer
  
  Are you talking about (X\_train,y\_train) and (X\_test,y\_test).
  If yes, then X represents the data(features) and y represents the labels of that data. That's why you get a pair when you divide it into training and test data
  
  
  ---
  
  ### Answer by username_2 on 2020-02-07. Score: 1
  
  For any Machine Learning model, the available data is usually split into three sets:
  
  **Training Set:**
  
  The part of data used to train the model and learn the parameters of the network.
  
  The data that remains after allocation of the Training Dataset, is split into the Validation and Test sets.
  
  **Validation Set:**
  
  This sample of data is used to provide an unbiased evaluation of a model fit on the training dataset. This helps in tuning model hyperparameters to improve the model performance. Eg: Changing the number of clusters ($k$) in a K-Means algorithm, or the pooling layers in a CNN.
  
  **Test Set:**
  
  After training, this part of the dataset is used to used to test how well the model generalizes to unseen data and estimate its performance.
  
  Another possibility (going by your question), is the use of **Cross-Validation**. This is performed when the dataset is too small. In such a case, a random split is performed on the dataset resulting in k non-overlapping subsets. The test error is then estimated by taking the average test error across k trials.
  [![kFold](https://i.sstatic.net/IqYBM.png)](https://i.sstatic.net/IqYBM.png)
  [[Image Source]](https://en.wikipedia.org/wiki/Cross-validation_(statistics))
  
  > **Comments:**
  > **username_3**: You're not answering the question "While we split data in training and test data, _why we have to pairs of each?_" or addressing the confusion completely. The OP thinks that both the training and test datasets are again divided into two chunks.  
  > **username_2**: As far as I know, I have never come across a scenario where such a split has been used. I clarified his doubt by answering the general approach to splitting a dataset (without explicitly hinting at the fact that he might have a misconception). If you are aware of a case where such a splitting condition is used, you are free to elucidate on it.  
  
  ---
  
  ### Answer by username_4 on 2020-02-07. Score: 0
  
  Usually we are splinting the data into 3 chunks for example 70% for training, 10% for validation and 20% for testing. The first two chunks are going to be used for training. The reason you need the validation dataset is to tune your hyper-parameters and see how well your model can generalize. Once you have a model that achieves a fairly good performance on the validation dataset, you're measuring its accuracy on the test dataset.
  
  > **Comments:**
  > **username_3**: You're not answering the question "While we split data in training and test data, _why we have to pairs of each?_" or addressing the confusion completely. The OP thinks that both the training and test datasets are again divided into two chunks.  
  > **username_3**: Btw, I didn't downvote this answer and I am not sure why someone would.  
  
  ---
  
  