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

docs: update documentation for LogProbability functions #817

Merged
merged 3 commits into from
Mar 22, 2022

Conversation

wmchad
Copy link
Contributor

@wmchad wmchad commented Mar 21, 2022

This PR updates the documentation for a few of the functions that deal with LogProbability. The documentation should be more correct, but I think a more long term solution would involve changing the names of a few functions. In particular:

  • or could be more appropriately named add or something similar. It is just used to add probabilities, which is appropriate for Pr(A or B) only if A and B are mutually independent. For independent events, Pr(A or B) = Pr(A) + Pr(B) - Pr(A)*Pr(B).
  • aOrNotB could be more appropriately names subtract or similar. It is just used to subtract one probability from another.

def and(values: Array[Double]): LogProbability = values.sum

Is there a reason this and function takes Array[Double] and not Array[LogProbability]?

@codecov-commenter
Copy link

codecov-commenter commented Mar 21, 2022

Codecov Report

Merging #817 (92d078f) into main (560f089) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main     #817   +/-   ##
=======================================
  Coverage   95.58%   95.58%           
=======================================
  Files         122      122           
  Lines        7068     7068           
  Branches      511      511           
=======================================
  Hits         6756     6756           
  Misses        312      312           
Flag Coverage Δ
unittests 95.58% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
.../scala/com/fulcrumgenomics/util/NumericTypes.scala 95.94% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 560f089...92d078f. Read the comment docs.

Copy link
Member

@nh13 nh13 left a comment

Choose a reason for hiding this comment

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

Thank-you for the doc updates, one minor suggestion!

@nh13
Copy link
Member

nh13 commented Mar 21, 2022

Will merge once tests pass!

@nh13 nh13 merged commit bb36b51 into fulcrumgenomics:main Mar 22, 2022
@nh13
Copy link
Member

nh13 commented Mar 22, 2022

Thank-you @wmchad!

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