IT. Expert System.

PHP

Solve the linear least squares problem, using SVD


Lapack::leastSquaresBySVD

(PECL lapack >= 0.1.0)

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

a

Matrix A

b

Matrix B

Return Values

Returns the solution as an array of arrays.

Examples

Example #1 Using Lapack::leastSquaresBySVD():

<?php

  $a 
= array(
      array( 
1.44,  -7.84,  -4.39,   4.53),
      array(-
9.96,  -0.28,  -3.24,   3.83),
      array(-
7.55,   3.24,   6.27,  -6.64),
      array( 
8.34,   8.09,   5.28,   2.06),
      array( 
7.08,   2.52,   0.74,  -2.47),
      array(-
5.45,  -5.70,  -1.19,   4.70),
  );

  
$b = array(
      array( 
8.58,   9.35),
      array( 
8.26,  -4.43),
      array( 
8.48,  -0.70),
      array(-
5.28,  -0.26),
      array( 
5.72,  -7.36),
      array( 
8.93,  -2.52),           
  );

  
$result Lapack::leastSquaresBySVD($a$b);
  
  
?>



Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 318 / 158692671. Delta: 0.03037 с