PriorPenalized
- class pmrf.problems.PriorPenalized(problem: AbstractProblem)
Bases:
AbstractProblemA problem penalized by the negative log prior of its parameters.
Minimizing a penalized problem gives the maximum a posteriori estimate, where the problem alone gives the maximum likelihood estimate. Priors are extracted over the whole problem, so the terms’ own hyper-parameters are covered alongside the model’s parameters.
Priors are metadata and are stripped by unwrapping, so they are extracted once on construction while the problem is still wrapped.
- Parameters:
problem (pmrf.problems.AbstractProblem) – The problem to penalize.
- __call__(*args, **kwargs) Array
Evaluate the problem.
- distributions: Any
The prior distributions of the problem’s parameters.
- property inner: AbstractProblem
The problem itself, or the one it wraps, looking through any nesting.
- property model: Any
- problem: AbstractProblem
The problem being penalized.