hutiefang76 opened a new pull request, #337: URL: https://github.com/apache/commons-math/pull/337
Fixes MATH-1392: https://issues.apache.org/jira/browse/MATH-1392 Sample-size validation always reserves a column for an intercept, including when `setNoIntercept(true)` is used. A full-rank 2×2 design such as `x = [[1, 2], [3, 4]]`, `y = [5, 11]` is therefore rejected before OLS or GLS can solve the uniquely determined coefficients `[1, 2]`. Count only the design columns actually used in both the flat and matrix entry points. Keep the existing default-intercept boundary, rejection of underdetermined and empty inputs, and covariance validation. This permits coefficient estimation for a square full-rank model; it does not make error variance estimable at zero residual degrees of freedom, and the Javadoc now states that limit. Validation on macOS ARM64: - Before changing production code, 60 OLS/GLS tests ran: the three new square no-intercept cases errored at the sample-size check; the other 57 passed. After the fix, all 60 passed, with no failures, errors or skips. - The official root `mvn -B clean verify` passed across all 14 modules under JDK 17. The 326 XML suites record 3,803 tests: 3,770 passed, 33 skipped, zero final failures or errors. The project's existing retry configuration was unchanged: 36 cases outside the new regressions passed after 61 failed attempts. These include the dedicated Simplex flaky-test execution; this was one build invocation, without an operator rerun. - An additional clean focused run under Zulu OpenJDK 8u492 passed all 60 OLS/GLS tests. These cases are already included in the full-suite count and are not added again. - Added exact-fit OLS flat/matrix and GLS matrix tests with independently calculated coefficients, plus default-intercept, insufficient-observation, empty-input and covariance controls. - `git diff --check` passed. The changelog entry is under MATH-1392. AI assistance: DeepSeek and Codex assisted the investigation, implementation, tests and review. The complete patch and actual test reports were checked before submission. Remote CI and maintainer review remain pending. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
