nessai.evidence
Functions related to computing the evidence.
Module Contents
Functions
|
Helper function to compute the exponential |
|
Trapezoidal integration of given log(func). Returns log of the integral. |
|
Compute the log-evidence for a given set of samples from the importance |
- nessai.evidence.logsubexp(x, y)
Helper function to compute the exponential of a difference between two numbers
Computes:
x + np.log1p(-np.exp(y-x))
- Parameters:
- x, yfloat or array_like
Inputs
- nessai.evidence.log_integrate_log_trap(log_func, log_support)
Trapezoidal integration of given log(func). Returns log of the integral.
- Parameters:
- log_funcarray_like
Log values of the function to integrate over.
- log_supportarray_like
Log prior-volumes for each value.
- Returns:
- float
Log of the result of the integral.
- nessai.evidence.log_evidence_from_ins_samples(samples: numpy.ndarray) float
Compute the log-evidence for a given set of samples from the importance nested sampler.
- Parameters:
- samplesnumpy.ndarray
Array of samples from the importance nested samples. Must have the logW field.
- Returns:
- float
The log-evidence