11.3.2.1. astroML.linear_model.TLS_logL

astroML.linear_model.TLS_logL(v, X, dX)[source]

Compute the total least squares log-likelihood

This uses Hogg et al eq. 29-32

Parameters
vndarray

The normal vector to the linear best fit. shape=(D,). Note that the magnitude |v| is a stand-in for the intercept.

Xndarray

The input data. shape = [N, D]

dXndarray

The covariance of the errors for each point. For diagonal errors, the shape = (N, D) and the entries are dX[i] = [sigma_x1, sigma_x2 … sigma_xD] For full covariance, the shape = (N, D, D) and the entries are dX[i] = Cov(X[i], X[i]), the full error covariance.

Returns
logLfloat

The log-likelihood of the model v given the data.

Notes

This implementation follows Hogg 2010, arXiv 1008.4686