Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixing the chi2 value printed in MFLike #96

Merged
merged 1 commit into from
Nov 14, 2024
Merged

fixing the chi2 value printed in MFLike #96

merged 1 commit into from
Nov 14, 2024

Conversation

sgiardie
Copy link
Collaborator

@sgiardie sgiardie commented Nov 14, 2024

In the line where we print the logp and the chi2, we have

chi2 = self._fast_chi_squared(self.inv_cov, delta)
logp = -0.5 * chi2 + self.logp_const
self.log.debug(f"Log-likelihood value computed = {logp} (Χ² = {-2 * chi2})")

so we print -2 chi2 instead of chi2. The extra -2 is a leftover factor from a previous implementation, see the version before this commit.
So I just removed the extra -2

@codecov-commenter
Copy link

codecov-commenter commented Nov 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.45%. Comparing base (894e3f3) to head (5f15256).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #96   +/-   ##
=======================================
  Coverage   85.45%   85.45%           
=======================================
  Files           3        3           
  Lines         550      550           
=======================================
  Hits          470      470           
  Misses         80       80           
Files with missing lines Coverage Δ
mflike/mflike.py 83.08% <100.00%> (ø)

@sgiardie sgiardie merged commit 2d681f8 into master Nov 14, 2024
13 checks passed
@sgiardie sgiardie deleted the fix-print branch November 14, 2024 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants