Docs For Class LevenbergMarquardt

PHPExcel

# Class: LevenbergMarquardt

Source Location: /PHPExcel/Shared/JAMA/examples/LevenbergMarquardt.php

### Class Overview

### Methods

- chiSquared
- solve

### Class Details

[line 7]
[ Top ]

### Class Methods

### method chiSquared [line 21]

`void chiSquared( double[][] $x, double[] $a, $y, $s, object $f, double[] $y,, double[] $s,)`

Calculate the current sum-squared-error

Chi-squared is the distribution of squared Gaussian errors, thus the name.

#### Parameters:

double[][] | $x |
double[] | $a |
double[] | $y, |
double[] | $s, |
object | $f |
| $y |
| $s |

[ Top ]

### method solve [line 57]

`the solve( x $x, y $a, a $y, vary $s, s2 $vary, lambda $f, termepsilon $lambda, maxiter $termepsilon, verbose $maxiter, $verbose)`

Minimize E = sum {(y[k] - f(x[k],a)) / s[k]}^2 The individual errors are optionally scaled by s[k].

Note that LMfunc implements the value and gradient of f(x,a), NOT the value and gradient of E with respect to a!

#### Tags:

return: | new lambda for future iterations. Can use this and maxiter to interleave the LM descent with some other task, setting maxiter to something small.

#### Parameters:

x | $x | array of domain points, each may be multidimensional
y | $a | corresponding array of values
a | $y | the parameters/state of the model
vary | $s | false to indicate the corresponding a[k] is to be held fixed
s2 | $vary | sigma^2 for point i
lambda | $f | blend between steepest descent (lambda high) and jump to bottom of quadratic (lambda zero). Start with 0.001.
termepsilon | $lambda | termination accuracy (0.01)
maxiter | $termepsilon | stop and return after this many iterations if not done
verbose | $maxiter | set to zero (no prints), 1, 2
| $verbose |

[ Top ]

Documentation generated on Sun, 27 Feb 2011 16:32:28 -0800 by phpDocumentor 1.4.3