Expand description
Lawson-Hanson active-set NNLS (scipy.optimize.nnls’s algorithm): solves
min ||Ax - b||^2 subject to x >= 0. Self-contained (no external linear-algebra crate) —
columns are few (n_estimators <= 32), so dense Gaussian elimination on the small
passive-set normal-equations system is more than adequate.
Functions§
- finalize_
weights - The wrapper’s ensemble-weight post-processing: normalize NNLS weights to sum to 1 (fallback
to uniform if the sum is 0), then blend with uniform via
nnls_beta. - nnls
ais column-major:a[j]is thej-th column (lengthm, matchingb’s length). Returns then = a.len()-length non-negative solution.