rxmc.observation.FixedCovarianceObservation#
- class rxmc.observation.FixedCovarianceObservation(x: ndarray, y: ndarray, covariance: ndarray)[source]#
Bases:
ObservationA class to represent an observation with fixed covariance. That is, the covariance matrix for the Multivariate Gaussian likelihood for a model prediction ym is known a priori and does not change with the model prediction.
The simplest such case is when the covariance is a diagonal matrix containing the reported statistical variances for each data point in y.
In the case that the covariance is a vector, it is interpreted as the diagonal of the covariance matrix, and the likelihood reduces to the standard form using the chi-squared statistic. In the case that the covariance is a full matrix, this corresponds to the generalised chi-squared statistic.
- __init__(x: ndarray, y: ndarray, covariance: ndarray)[source]#
Initializes the FixedCovarianceObservation with data and a fixed covariance matrix.
- Parameters:
x (np.ndarray) – The independent variable data.
y (np.ndarray) – The dependent variable data.
covariance (np.ndarray) – The fixed covariance matrix associated with the observation.
Methods
__init__(x, y, covariance)Initializes the FixedCovarianceObservation with data and a fixed covariance matrix.
covariance(y)Returns the fixed covariance matrix for the observation, which is constant and does not depend on y.
num_pts_within_interval(ylow, yhigh[, xlim])Returns the number of points in y that fall between ylow and yhigh, useful for calculating emperical coverages
residual(ym)