Navigation
| class DistanceCostFunction( ErrorDistribution ) | Source |
|---|
To calculate a distance based cost function
For one observation with n counts it holds
f( d ) = exp( -SUM( d / s ) )
where d are the distances and s is the scale
The function is mostly used to calculate the likelihood L of traveling-salesman-like problems
Author Do Kester.
| DistanceCostFunction( copy=None ) |
|---|
Constructor.
Parameters
- copy : DistanceCostFunction
distribution to be copied.
| copy( ) |
|---|
| acceptWeight( ) |
|---|
| logLikelihood_alt( problem, allpars ) |
|---|
Parameters
- problem : Problem
to be solved - allpars : array_like
list of all parameters in the problem
| logLdata( problem, allpars ) |
|---|
Parameters
- problem : Problem
to be solved - allpars : array_like
list of all parameters in the problem
| partialLogL( model, param, fitIndex ) |
|---|
Parameters
- model : Model
model to calculate mock data - param : array_like
parameters of the model - fitIndex : array_like
indices of the params to be fitted
| Methods inherited from ErrorDistribution |
|---|
- getGaussianScale( problem, allpars=None )
- getResiduals( problem, allpars=None )
- getChisq( problem, allpars=None )
- toSigma( scale )
- isBound( )
- keepFixed( fixed=None )
- setPriors( priors )
- setLimits( limits )
- domain2Unit( dval, ks )
- unit2Domain( uval, ks )
- logCLhood( problem, allpars )
- logLhood( problem, allpars )
- partialLogL_alt( problem, allpars, fitIndex )
- numPartialLogL( problem, allpars, fitIndex )
- updateLogL( problem, allpars, parval=None )
- setResult( )
- hyparname( k )