# Confusion while validating dataset using cross-validation in scikit learn

My confusion stems from this image

found on the Scikit-learn docs here. As far as I understand from this picture is that the entire dataset is split into two train and test sets and cross-validation happens on the training part only. But how do we perform the final evaluation as shown in the picture by the orange box? The docs only show this example

from sklearn.model_selection import cross_val_score
clf = svm.SVC(kernel='linear', C=1, random_state=42)
scores = cross_val_score(clf, X, y, cv=5)
scores


which would then just output the array of scores of each folds like so array([0.96..., 1. ..., 0.96..., 0.96..., 1. ]). How do I do the Final evaluation of the originally held-out data kept for final validation as shown by the orange box in the picture? I'm not getting any clear understanding of this from the docs

• Welcome to Cross Validated! Are you asking about the statistics or the implementation in sklearn in particular?
– Dave
Jan 20 at 16:59
• Hi..I'm asking about the implementation of cross-validation in sklearn in particular. I'm confused how to perform the final evaluation after I cross-validate the data. Do I fit and predict again on the train test split or is there any other way to do so pls? Jan 20 at 17:42