question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Log likelihood of covariance incorrect?

See original GitHub issue

First of all, I apologize if it’s just me making a mistake here. However, I can’t seem to reconcile my understanding of the gaussian likelihood function with the one in empirical_covariance.py.

In particular:

log_likelihood_ = - np.sum(emp_cov * precision) + fast_logdet(precision)

The term emp_cov * precision should be multiplied by p. In the multivariate gaussian density, it’s the scatter matrix, not the covariance matrix, who’s Frobenius inner product is being computed.

Am I missing something here or is this incorrect?

EDIT: Here’s a source that seems to confirm my interpretation (slide 34).

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:9 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
agramfortcommented, Feb 1, 2020

for me there is no n (aka n_samples in our formula) as it’s the mean log likelihood.

1reaction
agramfortcommented, Jan 30, 2020

@ashaffer I don’t know where the p would come from. You can do a numerical test if you want to confirm. Simulate data that match the model and check that log like tends to 0.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Find covariance of estimator and derivative of the log ...
Try things in the univariate case. I'll suppose f(x;θ) is the density and we're estimating θ with ˆθ which is unbiased but otherwise...
Read more >
Negative Log Likelihood - an overview | ScienceDirect Topics
In other words, when the distributions that describe the data are Gaussians with a common covariance matrix, then the log ratio of the...
Read more >
How to evaluate the multivariate normal log likelihood
The log likelihood depends on the mean vector μ and the covariance matrix, Σ, which are the parameters for the MVN distribution.
Read more >
Maximum Likelihood Estimation (MLE) - Sherry Towers
As we'll see in a moment, the standard errors of the estimator, ˆθ, are just the square roots of the diagonal terms in...
Read more >
Chapter 3 Maximum Likelihood Estimation - DiSCDown
However, if there is an interior solution to the problem, we solve the ... The asymptotic covariance matrix of the MLE can be...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found