()
| 49 | |
| 50 | #[test] |
| 51 | fn test_purged_kfold_basic() { |
| 52 | let info_sets = make_series("2019-01-01 00:00:00", 20, 1); |
| 53 | let pkf = PurgedKFold::new(3, info_sets.clone(), 0.0).unwrap(); |
| 54 | let splits = pkf.split(info_sets.len()).unwrap(); |
| 55 | assert_eq!(splits.len(), 3); |
| 56 | for (train, test) in splits { |
| 57 | assert!(!train.is_empty()); |
| 58 | assert!(!test.is_empty()); |
| 59 | // ensure disjoint |
| 60 | for t in &test { |
| 61 | assert!(!train.contains(t)); |
| 62 | } |
| 63 | } |
| 64 | } |
| 65 | |
| 66 | #[test] |
| 67 | fn test_purged_kfold_embargo() { |
nothing calls this directly
no test coverage detected