DistanceCostFunction = class DistanceCostFunction(ErrorDistribution) |
|
DistanceCostFunction(copy=None)
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. |
|
- Method resolution order:
- DistanceCostFunction
- ErrorDistribution
- builtins.object
Constructor:
- DistanceCostFunction( copy=None )
- Constructor.
Parameters
----------
copy : DistanceCostFunction
distribution to be copied.
Methods defined here:
- acceptWeight()
- True if the distribution accepts weights.
Always false for this distribution.
- copy()
- Return copy of this.
- logLdata( problem, allpars )
- Return the individual distances (multiplied by the weights).
Parameters
----------
problem : Problem
to be solved
allpars : array_like
list of all parameters in the problem
- logLikelihood_alt( problem, allpars )
- Return the negative sum of the distances.
Parameters
----------
problem : Problem
to be solved
allpars : array_like
list of all parameters in the problem
- partialLogL( model, param, fitIndex )
- Does not work for this class
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:
- domain2Unit( dval, ks )
- getChisq( problem, allpars=None )
- getGaussianScale( problem, allpars=None )
- getResiduals( problem, allpars=None )
- hyparname( k )
- isBound()
- keepFixed( fixed=None )
- logCLhood( problem, allpars )
- logLhood( problem, allpars )
- numPartialLogL( problem, allpars, fitIndex )
- partialLogL_alt( problem, allpars, fitIndex )
- setLimits( limits )
- setPriors( priors )
- setResult()
- toSigma( scale )
- unit2Domain( uval, ks )
- updateLogL( problem, allpars, parval=None )
|
|