Skip to content

Prepare Numerus 1.1.0 WLS release candidate - #211

Merged
ephpicman merged 38 commits into
mainfrom
feature/php-wls-primitives
Oct 22, 2026
Merged

ephpicman merged 38 commits into
mainfrom
feature/php-wls-primitives

Conversation

@ephpicman

@ephpicman ephpicman commented Oct 22, 2026 •

Copy link
Copy Markdown
Owner

Summary

Prepare the WLS-enabling 1.1.0 release candidate on top of the existing OLS foundation.

  • Expose Matrix::weightedLeastSquares(Matrix $rightHandSide, array $weights): Matrix using the native implementation.
  • Use square-root row scaling plus pivoted QR; do not form weighted normal equations or introduce model-specific fit_wls().
  • Document weight semantics, multiple RHS, rank requirements, exception behavior, memory costs, and the Windows support caveat.
  • Add a runnable WLS example with deterministic coefficient checks, an end-to-end PHPT, and named-argument/Reflection coverage.
  • Update the 1.1.0 changelog, version macro, release roadmap, release-gate audit, documentation index, and source-archive workflow.
  • Extend the clean source-archive smoke test to verify version 1.1.0 and run both OLS and WLS examples.

Numerical contract

  • Weights must be PHP integers/floats, finite, non-negative, and one per observation.
  • Zero weights remove an observation's contribution to the objective; matrix values in those rows are still validated.
  • The effective weighted design must have full column rank. Rank-deficient and underdetermined inputs are rejected.
  • The implementation materializes square-root-scaled design and response matrices, requiring additional memory proportional to input size.
  • Windows remains unverified; this PR does not claim Windows validation.

Validation

All required workflows passed on the exact PR head d54a1e551dcd293fe55aa6ce1ad1dc031736f875:

The source archive verifies version 1.1.0, runs the PHPT suite, and executes both OLS and WLS examples.

@ephpicman ephpicman changed the title Expose weighted least squares through the PHP Matrix API Prepare Numerus 1.1.0 WLS release candidate Oct 22, 2026
@ephpicman
ephpicman marked this pull request as ready for review October 22, 2026 22:32
@ephpicman
ephpicman merged commit cda4ed4 into main Oct 22, 2026
7 checks passed
@ephpicman
ephpicman deleted the feature/php-wls-primitives branch October 22, 2026 22:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant