End-to-End ML Project- Beginner friendly

85 / 95

Cross Validation

We use the cross_val_score() function from sklearn to perform cross-validation. It performs K-fold cross-validation.

What it does is that it splits our dataset into k distinct subsets also called folds. Then it trains and evaluates our model k times, picking a different subset for evaluation and using the rest of the k-1 subsets for training. The result is an array containing k evaluation scores.

So, cross-validation, when k is 5, looks like:

enter image description here


No hints are availble for this assesment

Answer is not availble for this assesment

Loading comments...