Commit 631802f
committed
fix(model_selection): pin KFold seed in knn cross-validation tests
Under --all-features the std_rand feature makes an unseeded KFold draw
OS entropy, so every CI run shuffled the folds differently. A sweep of
20k seeds showed 0.17% of shuffles violate the MAE < 10.0 assertion in
test_cross_val_predict_knn (worst 12.81) and 0.01% violate
train_score < test_score in test_cross_validate_knn.
Pin seed Some(11) in both tests; margins are comfortable (predict MAE
2.84 vs 10, validate test 2.71 vs 15). The entropy path stays covered
by the rand_custom tests.1 parent c80a7de commit 631802f
1 file changed
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
451 | 451 | | |
452 | 452 | | |
453 | 453 | | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
454 | 457 | | |
455 | 458 | | |
456 | 459 | | |
| |||
500 | 503 | | |
501 | 504 | | |
502 | 505 | | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
503 | 509 | | |
504 | 510 | | |
505 | 511 | | |
| |||
0 commit comments