Lapack::leastSquaresByFactorisationCalculate the linear least squares solution of a matrix using QR factorisation Description
public static array Lapack::leastSquaresByFactorisation
( array
$a
, array $b
)Solve the linear least squares problem, find min x in || B - Ax || Returns an array representing x. Expects arrays of arrays, and will return an array of arrays in the dimension B num cols x A num cols. Uses QR or LQ factorisation on matrix A. Parameters
Return ValuesArray of the solution matrix Examples
Example #1 Using Lapack::leastSquaresByFactorisation:
<?php |