Debian Patches
Status for octave-statistics/1.9.1-3
| Patch | Description | Author | Forwarded | Bugs | Origin | Last update |
|---|---|---|---|---|---|---|
| stop-asserting-two-quantities-that-vary-by-platform.patch | Stop asserting two quantities that vary by platform. ClassificationDiscriminant: LogDetSigma on the collinear fit is the logarithm of a rounding-level eigenvalue, moving 0.02 between platforms where doubling MinGamma moves it by log (2). Assert it to 0.1 rather than 1e-4. . RegressionLinear: the epsilon-insensitive loss is not differentiable at the edge of the band, so the objective reported is wherever the line search gives up, 2.8273 here and 3.4883 under clang and on macOS. Assert instead that the reported objective is the loss plus the ridge penalty, which holds at whichever point it stops. . Reported in issue #460. diff --git a/inst/Supervised_Learning/ClassificationDiscriminant.m b/inst/Supervised_Learning/ClassificationDiscriminant.m index 3edbe462..c5473086 100644 |
Andreas Bertsatos <abertsatos@biol.uoa.gr> | not-needed | debian | upstream, https://github.com/gnu-octave/statistics/commit/37f24288f424efc5da5bd749233360b9db03d13d | 2026-09-01 |
| symmetrise-every-matrix-before-it-is-factored.patch | Symmetrise every matrix before it is factored Zx * Dfull * Zx' and X' * MiX are symmetric in exact arithmetic but not bitwise, since each entry and its transpose are separate dot products accumulated in a different order. chol reads one triangle and ignores the other, so the factor depended on which triangle it read, and a blocked or threaded BLAS could hand back a different one from a reference build. Averaging with the transpose is the nearest symmetric matrix and costs O(n^2) against chol's O(n^3). . Reported in #460, where the five mixed model files fail under OpenBLAS and Apple Accelerate and pass under Netlib. This removes one platform dependence; it does not by itself explain the size of the divergence there, which is far larger than any eps-level perturbation of a matrix at condition number 15. . - inst/Regression/private/lmefit.m: symmetrise Mrel and XtMiX in both the fitting and the profiled deviance paths. - inst/Regression/private/glmefit.m: symmetrise V in build_V, XtViX in weighted_dev, and A in logdet_spd. diff --git a/inst/Regression/private/__glmefit__.m b/inst/Regression/private/__glmefit__.m index 9a76cb20..7c2adfba 100644 |
Andreas Bertsatos <abertsatos@biol.uoa.gr> | not-needed | debian | upstream, https://github.com/gnu-octave/statistics/commit/8ae35afa0017dc5f7d46fc85fa35b10e5d1d84b1 | 2026-09-01 |
| give-fminunc-the-gradient-of-the-profiled-deviance-and-whiten-once.patch | Give fminunc the gradient of the profiled deviance, and whiten once The deviance was optimised by finite differences, which take a step near 1e-8 on an objective whose curvature in the variance components is around 1e-13. That left the estimate resolved to about 1e-6 and its last digits decided by the search path, so the fit moved with the linear algebra underneath it. On the balanced one-way fixture, where REML must equal the ANOVA estimate exactly, the variance component was 6.9e-07 out; it is now 1.4e-09, and the optimiser reaches a higher log-likelihood. . The gradient is closed form. dM/dtheta is Zx*(dD/dtheta)Zx', beta drops out because it is the GLS minimiser, and D = LL' makes every entry 2*(S*L)(i,j) for the matching accumulated S. One extra triangular solve, V = Rc'\Zx, gives Zx'*inv (M)*Zx, Zx'*inv (M)*r and Zx'*inv (M)*X, so the gradient never works in the observation dimension. . Alongside it, Mrel is Rc'*Rc, so X'*inv (Mrel)X is (Rc'\X)'(Rc'\X). The deviance now needs three triangular solves where six were used, XtMiX is symmetric by construction rather than by correction, and beta is the least squares solution of the whitened system instead of a normal equations solve. . Reported in #460, where the mixed model fits differ between BLAS builds. . - inst/Regression/private/lmefit.m: return the gradient from profiled_deviance and set GradObj; whiten once in both the deviance and the recovery paths. diff --git a/inst/Regression/private/__lmefit__.m b/inst/Regression/private/__lmefit__.m index cb56c144..16f18ce3 100644 |
Andreas Bertsatos <abertsatos@biol.uoa.gr> | not-needed | debian | upstream, https://github.com/gnu-octave/statistics/commit/d59e5020612511bfb7f9e40c3dbb2dfcc07b96fc | 2026-09-01 |
| give-fminunc-the-gradient-of-the-weighted-deviance-and-whiten-once.patch | Give fminunc the gradient of the weighted deviance, and whiten once The generalized case optimised by finite differences, as the linear one did before the previous commit. A finite difference takes a step near 1e-8 on an objective whose curvature in the variance components is orders of magnitude below that, so the estimate was resolved no better than the step and its last digits were decided by the search path. . The gradient is closed form and shorter here than in the linear case: only ZxDZx' in V depends on theta, beta drops out because it is the GLS minimiser, and the dispersion is held at one during the fit and profiled afterwards, so there is no scale term to differentiate through. With D = LL' giving dD = E_ijL' + LE_ij', every entry is 2(S*L)(i,j) for the matching accumulated S. One further triangular solve, Vv = Rc'\Zx, supplies Zx'*inv (V)*Zx, Zx'*inv (V)*r and Zx'*inv (V)*X, so nothing in the gradient works in the observation dimension. . V is Rc'*Rc, so X'*inv (V)X is (Rc'\X)'(Rc'\X). Whitening once halves the triangular solves and makes XtViX symmetric by construction rather than by correction. . Reported in #460, where the mixed model fits differ between BLAS builds. . - inst/Regression/private/glmefit.m: return the gradient from weighted_dev and set GradObj; whiten once. diff --git a/inst/Regression/private/__glmefit__.m b/inst/Regression/private/__glmefit__.m index 7c2adfba..ffdb7bda 100644 |
Andreas Bertsatos <abertsatos@biol.uoa.gr> | not-needed | debian | upstream, https://github.com/gnu-octave/statistics/commit/70becc8ac4d51cb12c2cf943bb1831c219356c24 | 2026-09-01 |
| take-the-fixed-effects-covariance-from-the-factor.patch | Take the fixed effects covariance from the factor covbeta was sigma2 * inv (XtMiX), a general inverse of a symmetric positive definite matrix. XtMiX is W'*W and so already has a Cholesky factor to hand. The previous commit did the same in glmefit, and this leaves the two files agreeing on how they compute the same quantity. . - inst/Regression/private/lmefit.m: take covbeta from chol (XtMix). diff --git a/inst/Regression/private/__lmefit__.m b/inst/Regression/private/__lmefit__.m index 16f18ce3..1e84c41d 100644 |
Andreas Bertsatos <abertsatos@biol.uoa.gr> | not-needed | debian | upstream, https://github.com/gnu-octave/statistics/commit/17afbd4ec5cce3a72dd88449d9d862088382622e | 2026-09-01 |
| loosen-three-tolerances-that-assert-the-platform-not-the-answer.patch | Loosen three tolerances that assert the platform, not the answer Reported in #460, where 24 BISTs fail on macOS and two more under clang. . The two nbinpdf assertions were added with the fix for the Inf at the mode and pinned at 1.1e-15 and 7.9e-14 relative. The rescue path is exp (gammaln (...) - gammaln (...) - gammaln (...) + ...), so the value rides on the platform's lgamma: both differ by the same 1.82e-12 relative on macOS. . RegressionLinear compared a coordinate descent fit to a closed form least squares reference at 1e-6 absolute, which is 1.7e-5 relative on the largest coefficient and 1.7e-4 on the smallest. The largest is the one that missed, by 3.3e-06 on macOS and 1.42e-06 under clang. . - inst/Distribution_Functions/nbinpdf.m: relative tolerances, with the reason. - inst/Supervised_Learning/RegressionLinear.m: relative tolerance on Beta. diff --git a/inst/Supervised_Learning/RegressionLinear.m b/inst/Supervised_Learning/RegressionLinear.m index a1cf6b8a..5aeaa046 100644 |
Andreas Bertsatos <abertsatos@biol.uoa.gr> | not-needed | debian | upstream, https://github.com/gnu-octave/statistics/commit/f0b8bcc990a898acad51a6f990609cd6fb80e111 | 2026-09-01 |
| loosen-the-regressiongp-lbfgs-tolerances-which-assert-the-search-path.patch | Loosen the RegressionGP lbfgs tolerances, which assert the search path. Reported in #460 by Rafael Laboissier, where the Debian i386 build is the one architecture still failing with the six patches applied. . The test held a converged lbfgs parameter to 1e-6 absolute, 9e-7 relative at 1.5051, on a surface that is flat at the optimum: the test below it holds the log likelihood of the two optimisers to 1e-8 and records that a 2e-7 move in the parameters buys 2e-10 of likelihood. i386 missed the second parameter by 1.368e-6. Beta goes relative with it, its 1e-6 absolute being 1.4e-5 relative. . - inst/Supervised_Learning/RegressionGP.m: relative tolerances, with the reason. diff --git a/inst/Supervised_Learning/RegressionGP.m b/inst/Supervised_Learning/RegressionGP.m index 5dcba425..60a95aea 100644 |
Andreas Bertsatos <abertsatos@biol.uoa.gr> | not-needed | upstream, https://github.com/gnu-octave/statistics/commit/e4c1c7978291377c5e50f08cb528b5cd9c3918b9 | 2026-09-01 |
