This documentation is for astroML version 0.2

This page

Links

astroML Mailing List

GitHub Issue Tracker

Videos

Scipy 2012 (15 minute talk)

Scipy 2013 (20 minute talk)

Citing

If you use the software, please consider citing astroML.

11.3.2.1. astroML.linear_model.TLS_logL

astroML.linear_model.TLS_logL(v, X, dX)

Compute the total least squares log-likelihood

This uses Hogg et al eq. 29-32

Parameters :

v : ndarray

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

X : ndarray

The input data. shape = [N, D]

dX : ndarray

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 :

logL : float

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

Notes

This implementation follows Hogg 2010, arXiv 1008.4686