To apply the k-fold cross validation (using 5 folds as in the above example), you should train with 4 folds, and then test with 1 fold. The code example is doing the opposite. So, it should be:
Train with 4 folds
| sample partitions=5 seed=1| where partition_number!=0 | fit ... into your_model |
Test with 1 fold
| sample partitions=5 seed=1| where partition_number=0 | apply your_model
... View more