Open haohq19 opened 1 year ago
Oh, thank you for your careful reading! Indeed the N < D case is less considered. I think the bug can be fixed if we pad sigma to have the shape of D, so that the result can be fixed after broadcasting. What do you think?
Yes, I agree with your solution :)
Great, would you mind open a pull request for that?
Yes I'd love to. I've pulled a request for the solution. Thank you very much.
Hi, I'm working on your paper and find a bug in _fit_fixed_point in LogME.py. One part of the calculation of evidence in line 146 is:
which is to calculate $-0.5\log{|A|}$ by multiply all the eigenvalues. The variable sigma here have the shape of (k, 1), where k is the rank of the feature matrix. However, matrix A have the shape of (D, D) so sigma here should have the shape of (D, 1), with the last D - k elements equal to zero.
This bug will cause a wrong result when N < D, in which case k<=N<D and the calculation of det(A) will be wrong.
Hope this might be helpful :)