pastas.solver.mcmc.Emcee.log_likelihood#
- pastas.solver.mcmc.Emcee.log_likelihood(p: pastas.typing.ArrayLike, noise: bool, weights: pandas.Series | None = None, callback: pastas.typing.CallBack | None = None) float#
Log-likelihood function.
- Parameters:
p (numpy.Array) – Numpy array with the parameters.
noise (bool) – If True, the noise model is applied to the residuals. This is passed on to the misfit function, which will apply the noise model if True.
weights (pandas.Series, optional) – Series with weights for the residuals. This is passed on to the misfit function, which will apply the weights if provided.
callback (callable, optional) – Callback function that will be called after each iteration of the solver. This is passed on to the misfit function, which will call the callback if provided.
- Returns:
lnlike – The log-likelihood for the parameters.
- Return type:
Notes
This method is always called by emcee.