Package qubx :: Module fit :: Class SimplexFitter
[hide private]
[frames] | no frames]

Class SimplexFitter

source code

object --+    
         |    
BaseFitter --+
             |
            SimplexFitter

Minimizes the sum-squared-residual using scipy.optimize.fmin.

Instance Methods [hide private]
 
__call__(self, curve, param_vals, xx, yy, vvv=[], ww=None, on_iter=<__builtin__.function object>, on_status=<__builtin__.function object>)
Returns improved param_vals, which minimize the sum-squared-residual between yy and curve.eval(param_vals, xx, vvv).
source code
 
__init__(self, max_iter=200, toler=1e-10)
x.__init__(...) initializes x; see help(type(x)) for signature
source code

Inherited from BaseFitter: stop

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Instance Variables [hide private]

Inherited from BaseFitter: max_iter, name, toler

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__call__(self, curve, param_vals, xx, yy, vvv=[], ww=None, on_iter=<__builtin__.function object>, on_status=<__builtin__.function object>)
(Call operator)

source code 

Returns improved param_vals, which minimize the sum-squared-residual between yy and curve.eval(param_vals, xx, vvv).

Parameters:
  • curve - BaseCurve
  • param_vals - list of float corresponding to curve.params
  • xx - numpy.array(dtype='float32') of x coords
  • yy - numpy.array(dtype='float32') of y coords
  • vvv - list of numpy.array(dtype='float32') of additional named data series, available to curve expr
  • ww - numpy.array(dtype='float32') of weighting factors, per sample, or None
  • on_iter - each improvement in param_vals, calls on_iter(param_vals, iter) -> True to continue iterating
  • on_status - text output callback: on_status(msg)
Returns:
(fitted param_vals, sum_sqr_residual, iterations, fit curve array)
Overrides: BaseFitter.__call__
(inherited documentation)

__init__(self, max_iter=200, toler=1e-10)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)