rxmc.likelihood_model.StudentTLikelihoodModel#

class rxmc.likelihood_model.StudentTLikelihoodModel[source]#

Bases: ParametricLikelihoodModel

A LikelihoodModel that uses a Student’s t-distribution for the likelihood. This is useful when the data has heavy tails or outliers, as it is more robust to deviations from normality compared to the Gaussian likelihood.

__init__()[source]#

Initializes the StudentTLikelihoodModel with a specified degrees of freedom.

Methods

__init__()

Initializes the StudentTLikelihoodModel with a specified degrees of freedom.

chi2(observation, ym, *likelihood_params)

Calculate the generalised chi-squared statistic.

covariance(observation, ym, *likelihood_params)

Returns the covariance matrix determined by the likelihood model, which is dependent on likelihood_params

log_likelihood(observation, ym, nu)

Calculate the log likelihood using the Student's t-distribution.

residual(observation, ym)

Return the residual observation.y - ym.

log_likelihood(observation: Observation, ym: ndarray, nu: float)[source]#

Calculate the log likelihood using the Student’s t-distribution.

Parameters:
  • observation (Observation) – The observation object containing the observed data.

  • ym (np.ndarray) – Model prediction for the observation.

  • nu (float) – Degrees of freedom for the Student’s t-distribution.

Returns:

float – Log likelihood value.