annayqho / TheCannon

a data-driven method for determining stellar parameters and abundances from stellar spectra
MIT License
39 stars 16 forks source link

Understanding the log determinant #25

Closed annayqho closed 9 years ago

annayqho commented 9 years ago

A point of confusion for me: in do_one_regression_at_fixed_scatter, a quantity called "logdet_Cinv" is calculated, which is the determinant of the log of the Cinv matrix. In do_one_regression, this quantity is subtracted from sum(chi*chi) during the calculation of chi2. @davidwhogg , I was wondering if you could explain why this happens. Thanks!

davidwhogg commented 9 years ago

Actually it is the log of the determinant of Cinv.

Look up (on Wikipedia, maybe) the "multivariate gaussian". The likelihood we have is the log of a multivariate gaussian probability density function for the data.