rxmc.likelihood_model.UnknownNoiseErrorModel#
- class rxmc.likelihood_model.UnknownNoiseErrorModel[source]#
Bases:
ParametricLikelihoodModelA ParametricLikelihoodModel in which each data point in the observation has the same, unknown, statistical error, which is a parameter, $epsilon$.
No matter the Observation, the statistical contribution to the covariance thus always takes the form:
\[\Sigma_{ij}^{stat} = \epsilon^2 \delta_{ij}\]where $epsilon$ is the statistical noise parameter.
- __init__()[source]#
Initializes the UnknownNoiseErrorModel, optionally with a fractional uncorrelated error.
Methods
__init__()Initializes the UnknownNoiseErrorModel, optionally with a fractional uncorrelated error.
chi2(observation, ym, *likelihood_params)Calculate the generalised chi-squared statistic.
covariance(observation, ym, log_epsilon)Returns the following covariance matrix:
log_likelihood(observation, ym, ...)Returns the log likelihood that ym reproduces observation.y
residual(observation, ym)Return the residual
observation.y - ym.- covariance(observation: Observation, ym: ndarray, log_epsilon: float)[source]#
Returns the following covariance matrix:
\[\Sigma_{ij} = \sigma^2_{i}^{stat} \delta_{ij} + \Sigma_{ij}^{sys} + \gamma^2 y_m^2(x_i, \alpha)\]where sigma^2_{i}^{stat} is the statistical variance of the i-th observation, which is dependent on the parameter $epsilon$, which is the statistical noise:
\[\sigma^2_{i}^{stat} = \epsilon^2 \delta_{ij}\](note this class ignores observation.statistical_covariance, replacing it with $epsilon$).
- Parameters:
observation (Observation) – The observation object containing the observed data.
ym (np.ndarray) – Model prediction for the observation.
log_epsilon (float) – natural log of the statistical noise, $epsilon$
- Returns:
np.ndarray – Covariance matrix of the observation.