pele.potentials.MLCost#
- class pele.potentials.MLCost(data, log_probf=None, probf=None)[source]#
Cost function to be used for maximum likelihood optimization.
- Parameters:
- dataarray of floats
The observed data.
- log_probfcallable log_probf(data, parameters)
Log of probability function which takes an array of data and an array of parameters and returns a float value
- probfcallable probf(data, parameters)
Probability function which takes an array of data and an array of parameters and returns a float value
Examples
To get maximum likelihood estimates of the parameters, do e.g.:
pot = MLCost(observed, probf=gauss) optimizer = LBFGS_CPP(parameters, pot) result = optimizer.run() opt_parameters = result.coords
Methods
|
return the gradient calculated numerically |
|
return the Hessian matrix of second derivatives computed numerically |
|
return the energy at the given coordinates |
|
return the energy and gradient at the given coordinates |
|
return the energy, gradient, and Hessian at the given coordinates |
|
|
|
return the gradient at the given coordinates |
|
return the hessian |
|
Get confidence interval on ML estimated parameters. |
|
|
|
print some information testing whether the analytical gradients are correct |
Attributes