Expand description
Minimal dense linear algebra (Cholesky) for the OLS long-AR path. Kept tiny on purpose; the core has no external dependencies.
Structs§
- Square
Matrix - Dense column-major-agnostic square matrix stored row-major.
Functions§
- ols
- OLS fit of
yon the columns ofX(row-majorrows × cols). Returns(beta, residual_variance, se)withsethe classical standard errorssqrt(σ̂² (XᵀX)⁻¹_jj)andσ̂² = RSS / (rows - cols). - singular_
values - Singular values of a dense
rows × colsmatrix (row-major), descending, by one-sided Jacobi: pairwise orthogonalisation of the columns until every pair is numerically orthogonal; the singular values are then the column norms.O(sweeps · cols² · rows)with a handful of sweeps — fine for theK × Kmatrices of the canonical-correlation step (K ≤ ~50).