Skip to content

v6.1.1: Optimize R rotation for the first two components (6.1.1) (#50)

Choose a tag to compare

@github-actions github-actions released this 14 Jul 01:21
· 8 commits to main since this release
dd3f95b
Step 3 of the shared Improved Kernel PLS inner loop now special-cases the first
two components -- r_1 = w_1 (copy) and r_2 = w_2 - (p_1^T w_2) r_1 (a vectorized
rank-1 update) -- using the general matrix form only from a >= 3. This avoids the
empty-(0,K)-slice matmuls at a=1 and the dispatch-heavy (K,1)@(1,1) matmul at a=2,
so the improved R is no longer slower than the original sequential recurrence for
small A (previously up to ~2x slower at K=10000). Output is identical;
performance-only. JAX backends already use the matmul form under lax.scan and are
unaffected.