ModelDistribution

 
ModelDistribution = class ModelDistribution(ScaledErrorDistribution)
    ModelDistribution(arbiter=None, scale=1.0, limits=None, copy=None)
 
To calculate the probability of a model M from a set of models S,
given some data D, use Bayes rule:
 
    P( M|DS ) = P( M|S ) * P( D|MS ) / P( D|S )
    posterior = prior   * likelihood / evidence
 
This class calculates the likelihood P( D|MS ).
On another level where we calculate the probability of the
parameters p, we see this likelhood appear as evidence P( D|M ).
 
Again using Bayes :
 
    P( p|DM ) = P( p|M ) * P( D|pM ) / P( D|M )
 
The evidence here is calculated as the integral over a Gausian
approximation of the posterior.
 
Author       Do Kester.
 
 
Method resolution order:
ModelDistribution
ScaledErrorDistribution
ErrorDistribution
builtins.object

Constructor:
ModelDistribution( arbiter=None, scale=1.0, limits=None, copy=None )
Default Constructor.
 
Parameters
----------
arbiter : None or BaseFitter or str
    to provide the evidence
    None    select fitter automatically
    BaseFiter   Use this fitter
    str     "fitter", "levenberg", "curve", "amoeba"
 
scale : float
    noise scale
limits : None or list of 2 floats [low,high]
    None : no limits implying fixed scale
    low     low limit on scale (needs to be >0)
    high    high limit on scale
    when limits are set, the scale is *not* fixed.
 
copy : ModelDistribution
    distribution to be copied.
Methods defined here:
acceptWeight()
True if the distribution accepts weights.
Always true for this distribution.
copy()
Return copy of this.
logLdata( problem, allpars, mockdata=None )
Return the log( likelihood ) for each residual
   
logL = sum( logLdata )
 
Parameters
----------
problem : Problem
    to be solved
allpars : array_like
    list of all parameters in the problem   
mockdata : array_like
    as calculated by the model
logLikelihood_alt( problem, allpars )
Return the log( likelihood ) for a Gaussian distribution.
 
Alternate calculation
 
Parameters
----------
problem : Problem
    to be solved
allpars : array_like
    list of all parameters in the problem
    Return optimal parameters of the fit

Methods inherited from ScaledErrorDistribution:
Methods inherited from ErrorDistribution: