-
Notifications
You must be signed in to change notification settings - Fork 0
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
Utilities for multivariate gaussians #4
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## mrc-5075 #4 +/- ##
==========================================
Coverage 100.00% 100.00%
==========================================
Files 5 5
Lines 88 97 +9
==========================================
+ Hits 88 97 +9 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, would be nice if we had a little bit more explanation on the variable names!
set.seed(1) | ||
x <- matrix(rnorm(20, sd = 10), ncol = 2) | ||
expect_equal(apply(x, 1, make_ldmvnorm(vcv)), | ||
mvtnorm::dmvnorm(x, sigma = vcv, log = TRUE)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is our implementation of the rmvnorm
(mvtnorm exposes the same thing) better? wondering why we implemented that in the distributions file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ours caches the decomposition. Later ours will also be translated into C++
Co-authored-by: M-Kusumgar <98405247+M-Kusumgar@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM :)
Some utilities for working with multivariate gaussians:
Currently merging into #1 because it contains those commits due to the support for sampling from a multivariate gaussian