pyPESTO
pyPESTO copied to clipboard
Separate likelihood and prior
Currently, the problem.objective
contains per default the posterior. This is what is needed for optimization, however for sampling having likelihood and prior separated would be preferable, in order not to evaluate things twice, and since it is otherwise impossible to verify whether the objective prior is the problem prior. One way of accomplishing this would be to make the problem._objective
private and add functions problem.get_neglogpost()
, problem.get_neglogprior()
, problem.get_negloglikelihood()
. Opinions?
Whats the reason to implement get_neglogpost
and get_neglogprior
, get_negloglikelihood
as problem
method? I find it more plausible to have them as method of objective
.
One could add said functionality to a class NegLogPosterior
(which should exist already), which should basically hold a prior and a likelihood, in addition to __call__
.
One could add said functionality to a class
NegLogPosterior
(which should exist already), which should basically hold a prior and a likelihood, in addition to__call__
.
Sounds good!
too many old issues ... this one's related to #594