11.3.2.1. astroML.linear_model.TLS_logL¶

astroML.linear_model.
TLS_logL
(v, X, dX)[source]¶ Compute the total least squares loglikelihood
This uses Hogg et al eq. 2932
 Parameters
 vndarray
The normal vector to the linear best fit. shape=(D,). Note that the magnitude v is a standin 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 loglikelihood of the model v given the data.
Notes
This implementation follows Hogg 2010, arXiv 1008.4686