Repository navigation
feat: add lasso and elastic net benchmarks - #9
Merged
Merged
Conversation
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.
This repo has no Lasso or Elastic Net benchmarks to compare the fit changes in smartcorelib/smartcore#480. This PR adds benchmarks for both estimators and instructions to compare eager and lazy normalization with a local smartcore checkout.
The Criterion benchmarks use fixed
f64data at four sizes: 1,024 × 32, 8,192 × 32, 65,536 × 32, and 1,024 × 128. Each size runs with row-major and column-majorDenseMatrixinputs and a row-majorndarrayinput. Data creation occurs outside the timed loop. Both estimators use normalization and the same solver settings across runs.The iai-callgrind benchmarks add three cases per estimator: normalized fits in both dense layouts and a row-major fit without normalization. Setup occurs outside the instruction count. Both CI jobs include the new benchmarks and continue to use the published smartcore release.
The
regularized_fitexample fits one model per process for peak-memory measurements with GNUtime. The README explains how to run these measurements and save an eager Criterion baseline for comparison with a lazy build.Validation:
cargo bench --no-runcargo fmt --all -- --checkcargo clippy --all-targets -- -D warnings--testmode with smartcore 0.6.15 and with the local PR checkout ataaa79c9, both with and withoutsmartcore/lazy-normalization.