MaxLikelihoodFitter

 
MaxLikelihoodFitter = class MaxLikelihoodFitter(IterativeFitter)
    MaxLikelihoodFitter(xdata, model, errdis=None, scale=None, power=2.0, **kwargs)
 
Base class with methods common to fitters handling ErrorDistributions.
 
Author:      Do Kester.
 
Attributes
----------
errdis : None | "gauss" | "laplace" | "cauchy" | "poisson" |
                "uniform" | "exponential"
    None : Use _ChiSq as function to be minimized
    name : use -logLikelihood as function to be minimized from the named
            errordistribution.
scale : float
    the (fixed) noise scale
power : float
    power of errdis (if applicable)
 
Raises
------
ConvergenceError    Something went wrong during the convergence if the fit.
 
 
Method resolution order:
MaxLikelihoodFitter
IterativeFitter
BaseFitter
builtins.object

Constructor:
MaxLikelihoodFitter( xdata, model, errdis=None, scale=None, power=2.0, **kwargs )
Create a new iterative fitter, providing xdatas and model.
 
This is a base class. It collects stuff common to all iterative fitters.
It does not work by itself.
 
Parameters
----------
xdata : array_like
    array of independent input values
model : Model
    the model function to be fitted
 
errdis : None | "gauss" | "laplace" | "cauchy" | "poisson" |
                "uniform" | "exponential"
    None : Use _ChiSq as function to be minimized
    name : use -logLikelihood as function to be minimized from the named
            errordistribution.
scale : float
    the (fixed) noise scale of errdis (if applicable)
power : float (2.0)
    the power of errdis ( if applicable)
kwargs : dict
    Possibly includes keywords from
        IterativeFitter :       maxIter, tolerance, verbose
        BaseFitter :            map, keep, fixedScale
Methods defined here:
getLogLikelihood( autoscale=False, var=1.0)
Return the log likelihood.
 
It is implementing eq 19/20 last parts (Kester 2002) term by term
 
Parameters
----------
autoscale : bool
    whether the noise scale is optimized too
var : float
    variance
getScale()
Return the stdev of the noise.
makeFuncs( data, weights=None, index=None, ret=3)
Make connection to the desired func, gradient and hessian.
 
Parameters
----------
data : array_like
    the data to be fitted
weights : array_like or None
    weights on the data
index : array_like
    indices of the parameters to be fitted.
ret : 1 or 2 or 3
    return (func), (func,dfunc) or (func,dfunc,hess)
normalize( normdfdp, normdata, weight=1.0)
Not Implemented.
 
Raises
------
NotImplementedError.
the method is not implemented for MaxLikelihoodFitters
testGradient( par, at, data, weights=None )
returns true if the test fails.

Methods inherited from IterativeFitter:
Methods inherited from BaseFitter: