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

Fix geometric_mean positive method #154

Merged
merged 6 commits into from
Nov 12, 2024
Merged

Conversation

juan-umana
Copy link
Member

  • Please check if the PR fulfills these requirements
  • [ X] I have read the CONTRIBUTING guidelines
  • A new item has been added to NEWS.md
  • Tests for the changes have been added (for bug fixes / features)
  • [ X] Docs have been added / updated (for bug fixes / features)
  • [ X] Checks have been run locally and pass
  • What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)

This PR solves #153 issue

  • What is the new behavior (if this is a feature change)?

Function now performs the estimation only on positive values

@juan-umana juan-umana linked an issue Nov 8, 2024 that may be closed by this pull request
2 tasks

gm <- exp(mean(log(x)))
gm <- exp(mean(log(x_positive)))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we previously errored if there were any negative or zero value, I believe we are guaranteed to have strictly positive values at this stage, aren't we?

If that's not the case, could you add a test case that fails on main but passes on this branch please?

@juan-umana juan-umana merged commit 9413df8 into main Nov 12, 2024
7 checks passed
@juan-umana juan-umana deleted the 153-bug-geometric_mean-function branch November 12, 2024 11:41
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.

Bug geometric_mean function
2 participants