v0.6.10 Release - #440
Merged
Merged
Conversation
Relax Precision, Recall and F1 (structs and free functions) from Number + RealNumber + FloatNumber to Number. Classification metrics need only equality and a canonical class key, so ordered integer labels (u16, i32, ...) now work. This lets the same y feed RandomForestClassifier::fit (Number + Ord) and cross_validate with &precision / &recall / &f1. Class keys are derived through a shared label_bits helper (to_f64 widening) instead of RealNumber::to_f64_bits raw transmutation; float-input scores are unchanged. - add integer-label unit tests to precision/recall/f1 - add regression test: cross_validate(RandomForestClassifier, ..., &precision) with Vec<u16> labels (#322) - bump patch 0.6.8 -> 0.6.9
- label_bits: replace unwrap with expect for a clear panic message when a custom Number impl fails to_f64 conversion - regression test: use DenseMatrix<f32> features, mirroring the exact report in #322
precision/recall/f1 on ClassificationMetrics<T> still required Number + RealNumber + FloatNumber, so the struct-based entry point could not be used with integer labels even though Precision/Recall/F1 and the free functions accept any Number (#322). Split roc_auc_score into its own impl block with the bounds AUC itself needs. Also complete the CHANGELOG wording: FloatNumber was dropped from the bounds too.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.