InferResult

class pmrf.infer.InferResult(best_model: ModelT, best_loglikelihood: Callable[[ModelT, Frequency], Array], sampled_model: ModelT = None, sampled_loglikelihood: Callable | Module = None, fn_values: Array = None, weights: Array = None, logevidence: Array = None, logevidence_err: Array = None, metrics: Any = None)

Bases: Module, Generic[ModelT]

The result of an inference run.

Contains the resultant maximum likelihood/maximum a posterior estimates, as well as the samples, function values and weights for nested sampling runs.

best_loglikelihood: Callable[[ModelT, Frequency], Array]

The maximum likelihood or maximum a posterior of the log-likelihood model.

best_model: ModelT

The maximum likelihood or maximum a posterior of the RF model.

fn_values: Array = None

The function values related to each sample for Bayesian sampling. Typically, this contains the log likelihood or log posterior values. Only populated for Bayesian sampling algorithms.

logevidence: Array = None

The estimated log evidence, if any.

logevidence_err: Array = None

The estimated error in the log evidence, if any.

metrics: Any = None

The underlying metrics returned by the solver, if any. May be a stripped-down version of the original results object.

sampled_loglikelihood: Callable | Module = None

A batched model containing the sampled log-likelihood model. Only populated for Bayesian sampling algorithms.

sampled_model: ModelT = None

A batched model containing the sampled RF model. Only populated for Bayesian sampling algorithms.

weights: Array = None

The weights related to each sample for Bayesian sampling, if any.