title: Where to use validation set in model training
body: <p>I have split my data into 3 sets train, test and validation as shown below:</p>
  <pre><code>
  X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.1, random_state=1)
  
  X_train, X_val, y_train, y_val = train_test_split(X_train, y_train, test_size=0.2, random_state=1)
  
  </code></pre>
  <p>I wanted to ask where do I put the validation set in this code:</p>
  <pre><code>
  #Defining Model
  model = LogisticRegression()
  model.fit(X_train, y_train)
  
  
  y_pred = model.predict(X_test)
  
  print(&quot;Accuracy on test  is:&quot;,accuracy_score(y_test,y_pred))
  #Measure Precision,Recall
  
  print(&quot;Precision Score: &quot;,precision_score(y_test, y_pred,average='macro'))
  print(&quot;Recall Score:    &quot;,recall_score(y_test, y_pred,average='macro'))
  print(&quot;F1-Score :&quot;,f1_score(y_test, y_pred,average='macro'))
  
  
  </code></pre>