title: What is the difference between X_test, X_train, y_test, y_train in sklearn?
body: <p>I'm learning sklearn and I didn't understand very good the difference and why use 4 outputs with the function <code>train_test_split()</code>.</p>
  <p>In the Documentation, I found some examples but it wasn't sufficient to end my doubts.</p>
  <p>Does the code use the <code>X_train</code> to predict the <code>X_test</code> or use the <code>X_train</code> to predict the <code>y_test</code>?</p>
  <p>What is the difference between train and test? Do I use train to predict the test or something similar?</p>
  <p>I'm very confused about it. I will let below the example provided in the Documentation.</p>
  <pre><code>&gt;&gt;&gt; import numpy as np  
  &gt;&gt;&gt; from sklearn.model_selection import train_test_split  
  &gt;&gt;&gt; X, y = np.arange(10).reshape((5, 2)), range(5)  
  &gt;&gt;&gt; X
  array([[0, 1], 
         [2, 3],  
         [4, 5],  
         [6, 7],  
         [8, 9]])  
  &gt;&gt;&gt; list(y)  
  [0, 1, 2, 3, 4] 
  &gt;&gt;&gt; X_train, X_test, y_train, y_test = train_test_split(  
  ...     X, y, test_size=0.33, random_state=42)  
  ...  
  &gt;&gt;&gt; X_train  
  array([[4, 5], 
         [0, 1],  
         [6, 7]])  
  &gt;&gt;&gt; y_train  
  [2, 0, 3]  
  &gt;&gt;&gt; X_test  
  array([[2, 3], 
         [8, 9]])  
  &gt;&gt;&gt; y_test  
  [1, 4]  
  &gt;&gt;&gt; train_test_split(y, shuffle=False)  
  [[0, 1, 2], [3, 4]]
  </code></pre>