DoodleR29CrossValidation (theaihow doodle Short #29)
Duration 01:26 · voice ElevenLabs b3LAxfqGNXNMzmX4iSAv

[00:00] You trained a model, tested it once, and the score looked great. That score might be luck. Let me draw how to tell.

[00:06] Here is your data. You hold a piece back, train on the rest, and test on the piece you kept.

[00:12] One number comes out. And that number depends entirely on which piece you happened to hold back.

[00:18] Get an easy slice, and your model looks brilliant. Get an awkward one, and the same model looks broken.

[00:24] So you stop testing once. Split the data into equal parts. Five is common.

[00:29] Hold out part one, train on the other four, and write down the score.

[00:34] So what makes this better than one lucky split?

[00:37] You put part one back and hold out part two instead. Train, score, write it down. Then part three, and so on, until every part has been the test exactly once.

[00:47] Now you have five scores instead of one. The number you report is their average. That is what the docs mean by k fold cross-validation.

[00:55] And the spread tells you something the average hides. Five scores that sit close together mean a steady model. Five that scatter mean you were about to trust a coin toss.

[01:04] It costs you. Five folds means training five times instead of once.

[01:09] That is the trade. More compute, for a number you can actually believe.

[01:14] So how many folds do you use? Tell me in the comments. Follow for more AI concepts in drawings. And if you are building AI tools at work, we help teams do it properly. The A.I. How dot com.
