diff --git a/CHANGELOG.md b/CHANGELOG.md index 09dcfbc5..054d6833 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.6.10] +### Fixed +- `model_selection`: pinned the `KFold` seed in the `test_cross_val_predict_knn` and `test_cross_validate_knn` unit tests. Under `--all-features` (`std_rand`) an unseeded `KFold` draws OS entropy, so each CI run shuffled the folds differently; a sweep of 20 000 seeds showed 0.17% of shuffles violate the `MAE < 10.0` assertion (worst 12.81) and 0.01% violate `train_score < test_score`, making CI flaky. Library behaviour is unchanged; the entropy-seeded path stays covered by the `rand_custom` tests. + ## [0.6.9] ### Fixed - `metrics`: `precision`, `recall`, and `f1` (the free functions, the `Precision` / `Recall` / `F1` metric structs, and the matching `ClassificationMetrics` entry points) now accept any label type that implements `Number`, including ordered integers such as `u16` or `i32`; labels no longer need to implement `RealNumber` or `FloatNumber` (#322). The same integer labels can now feed `RandomForestClassifier::fit` and classification metrics inside `model_selection::cross_validate`. Class keys are derived through a shared `f64` conversion instead of raw float bit transmutation; scores for float inputs are unchanged. diff --git a/Cargo.toml b/Cargo.toml index 7356044b..ef3cde97 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ name = "smartcore" description = "Machine Learning in Rust." homepage = "https://smartcorelib.github.io/" -version = "0.6.9" +version = "0.6.10" authors = ["smartcore Developers"] edition = "2024" rust-version = "1.85" diff --git a/src/model_selection/mod.rs b/src/model_selection/mod.rs index fe74fce4..c57ebc4c 100644 --- a/src/model_selection/mod.rs +++ b/src/model_selection/mod.rs @@ -451,6 +451,9 @@ mod tests { let cv = KFold { n_splits: 5, + // Pinned seed: under std_rand an unseeded KFold draws OS entropy, + // which makes these assertions flaky across CI runs. + seed: Some(11), ..KFold::default() }; @@ -500,6 +503,9 @@ mod tests { let cv: KFold = KFold { n_splits: 2, + // Pinned seed: under std_rand an unseeded KFold draws OS entropy, + // which makes these assertions flaky across CI runs. + seed: Some(11), ..KFold::default() };