Lapack::leastSquaresBySVDSolve the linear least squares problem, using SVD Description
public static array Lapack::leastSquaresBySVD
( 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 SVD with a divide and conquer algorithm. Parameters
Return ValuesReturns the solution as an array of arrays. Examples
Example #1 Using Lapack::leastSquaresBySVD:
<?php |