Improve phenotype scaling and safeguarded line search

This commit is contained in:
2026-08-09 15:05:40 +08:00
parent da971a2ca7
commit 76dd8b1379
8 changed files with 226 additions and 20 deletions

View File

@@ -17,6 +17,11 @@ The engine diagonalizes the GRM once, rotates the common design and every unique
- C++17 numerical core using oneMKL or OpenBLAS/LAPACKE.
- GRM eigendecomposition once per task set.
- AI-REML with a strong-Wolfe line search; no EM updates.
- Per-task OLS-residual phenotype scaling inside the numerical core, with all
estimates and the restricted likelihood restored to the input phenotype units.
- Safeguarded quadratic zoom interpolation (central 96% of the bracket),
bisection fallback, and a last-valid-improving-point fallback when strict Wolfe
curvature cannot be reached because of numerical roundoff.
- Signed standard-deviation parameterization with a separate one-sided KKT check for the \(\sigma_g^2=0\) boundary.
- No explicit dense \(P\) matrix.
- Variable numbers of extra fixed-effect covariates per task through a CSR index.
@@ -25,6 +30,13 @@ The engine diagonalizes the GRM once, rotates the common design and every unique
The numerical core has no knowledge of cohorts, molecular assay types, or domain-specific variable names.
The line search starts at 1, expands by 1.618 up to the configured maximum
step, and uses quadratic interpolation only when its stationary point lies at
least 2% away from both bracket endpoints. An invalid interpolation falls back
to bisection. If the evaluation limit is reached, the search accepts the last
finite covariance-valid point that improved the likelihood; it reports
`line_search_failed` only when no such point exists.
## Repository layout
```text