title: Cross val predict expects as input an already fitted model?
body: <p>I am reading Geron's Hands-on Machine Learning. In page 90, there is a section about Confusion Matrix. He says that we need some predictions, so he does the following:</p>
  <pre><code>from sklearn.model_selection import cross_val_predict
  
  y_train_pred = cross_val_predict(sgd_clf, X_train, y_train5, cv=3)
  </code></pre>
  <p>This object sgd_clf is a stochastic gradient descent classifier <strong>which was previously fitted with the train data in the previous section</strong>. My question is: why, if already fitted, it is better to split the train set in three parts and retrain (?) the sgd_clf in two of them, then make a prediction and so on, if sgd_clf is already trained? Why not just let it predict on full X_train? Or just take a new not-fitted classifier as imput? Why put sgd_clf already trained as imput to retrain? I am a bit confused.</p>