PoissonErrorDistribution

 
PoissonErrorDistribution = class PoissonErrorDistribution(ErrorDistribution)
    PoissonErrorDistribution(copy=None)
 
To calculate a Poisson likelihood.
 
For one observation with n counts it holds
 
    f( n,x ) = x^n / ( e^x * n! )
 
where x is the expected counts
 
The function is mostly used to calculate the likelihood L, or easier
to use log likelihood, logL.
 
    logL = ∑( n * log( x ) - x - log( n! ) )
 
Weights are not accepted in this ErrorDistribution; they are silently ignored.
 
 
Author       Do Kester.
 
 
Method resolution order:
PoissonErrorDistribution
ErrorDistribution
builtins.object

Constructor:
PoissonErrorDistribution( copy=None )
Constructor.
 
Parameters
----------
copy : PoissonErrorDistribution
    distribution to be copied.
Methods defined here:
acceptWeight()
True if the distribution accepts weights.
Always false for this distribution.
copy()
Return copy of this.
getScale( problem, allpars=None )
Return the noise scale.
 
*** Gaussian approximation ***
 
Parameters
----------
problem : Problem
    to be solved
allpars : array_like
    None take parameters from problem.model
    list of all parameters in the problem
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 Poisson distribution.
 
Parameters
----------
problem : Problem
    to be solved
allpars : array_like
    list of all parameters in the problem
nextPartialData( problem, allpars, fitIndex, mockdata=None )
Return the partial derivative of log( likelihood ) to the parameters.
 
Parameters
----------
problem : Problem
    to be solved
allpars : array_like
    list of all parameters in the problem
fitIndex : array_like
    indices of parameters to be fitted
mockdata : array_like
    as calculated by the model
partialLogL_alt( problem, allpars, fitIndex )
Return the partial derivative of log( likelihood ) to the parameters.
 
Parameters
----------
problem : Problem
    to be solved
allpars : array_like
    list of all parameters in the problem
fitIndex : array_like
    indices of parameters to be fitted

Methods inherited from ErrorDistribution: