Skip to content

fix(ica): add missing exponential#426

Merged
relf merged 2 commits intorust-ml:masterfrom
lmmx:ica-exp-fix-425
Dec 22, 2025
Merged

fix(ica): add missing exponential#426
relf merged 2 commits intorust-ml:masterfrom
lmmx:ica-exp-fix-425

Conversation

@lmmx
Copy link
Copy Markdown
Contributor

@lmmx lmmx commented Dec 21, 2025

Simple fix to the exp variant of fast ICA algo, a missing .exp() call

@codecov
Copy link
Copy Markdown

codecov Bot commented Dec 21, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 77.00%. Comparing base (9b5c424) to head (681da88).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #426   +/-   ##
=======================================
  Coverage   77.00%   77.00%           
=======================================
  Files         106      106           
  Lines        7461     7461           
=======================================
  Hits         5745     5745           
  Misses       1716     1716           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@lmmx lmmx marked this pull request as ready for review December 21, 2025 22:49
@relf relf merged commit 54ea637 into rust-ml:master Dec 22, 2025
21 checks passed
jagan-nuvai added a commit to Nuvai/linfa that referenced this pull request Apr 30, 2026
Brings in master's 0.8.1 release work and downstream commits:
- 4484a55 Bump all crates 0.8.0 -> 0.8.1
- 59fc6c6 Prepare release 0.8.1 (rust-ml#428)
- 54ea637 fix(ica): add missing exponential (rust-ml#426)
- 9b5c424 Add AdaBoost classifier to linfa-ensemble (rust-ml#427)
- db3cade [Feature] Add Least Angle Regression (rust-ml#421)
- Plus website / news / about updates

Conflict resolution: 7 Cargo.toml files (linfa-clustering, linfa-hierarchical,
linfa-linear, linfa-nn, linfa-preprocessing, linfa-reduction, datasets) had
conflicts where master's 0.8.0 -> 0.8.1 version bump landed on lines our
branch had ndarray ecosystem version bumps on. Took the union: master's 0.8.1
plus our ndarray 0.17 / rand 0.9 / sprs 0.11.4 / rand_xoshiro 0.7 versions.

Migration of merged code to our ndarray 0.17 / rand 0.9 ecosystem:

linfa-ensemble (AdaBoost from rust-ml#427)
- src/adaboost.rs: distributions::WeightedIndex -> distr::weighted::WeightedIndex
- src/adaboost_hyperparams.rs: thread_rng() -> rng()

linfa-lars (LARS from rust-ml#421)
- Cargo.toml: bumped to ndarray 0.17 / ndarray-linalg 0.18 / ndarray-stats 0.7
  / linfa-linalg fork branch / ndarray-rand 0.16 / rand_xoshiro 0.7
- src/algorithm.rs:151: extracted RHS into a let-binding to satisfy the
  ndarray-0.17 stricter borrow check on `coef.assign(&(... &coef ...))`
- src/algorithm.rs:600: Uniform::new() now returns Result, added .unwrap()

AdaBoost orphaned pending follow-up
- Removed `mod adaboost;` and `mod adaboost_hyperparams;` from
  linfa-ensemble/src/lib.rs (sources stay on disk for the follow-up PR)
- Gated 6 AdaBoost test functions with #[cfg(any())]
- Removed AdaBoost section from doc comment
- Deleted adaboost_iris example (cannot compile without the public types)
- Reason: AdaBoost's `impl Fit for AdaBoostValidParams<P, R>` writes
  `where P: Fit<...> + Clone`, which under generic P can only be satisfied via
  Linfa's `ParamGuard` blanket impl. The blanket requires `P: ParamGuard +
  Clone, P::Checked: Fit, Error: From<P::Error>`, which under ndarray 0.17's
  reshaped types triggers an infinite trait-solver recursion. Fixing it
  requires structural rework (likely making AdaBoost take a model factory
  rather than generic `Fit`-able params). Out of scope for this dependency
  upgrade PR; tracked separately.

Verified on x86_64-linux (knuckles-dev VM):
  cargo check --workspace --all-targets   -> exit 0, 0 warnings
  cargo test  --workspace                 -> 475 passed, 0 failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants