feat: accessor methods to various distribution#316
feat: accessor methods to various distribution#316YeungOnion merged 4 commits intostatrs-dev:masterfrom
Conversation
… precision in MultivariateNormal
|
Thanks for working on this. I think it all looks good, but I'm not sure if it's best to leak the implementation of multivariate normal with If you can make these return cloned/owned values, it will be less binding in our API - there is no implication that the struct owns such data. While I have no expectations for this to change, but we're still fairly new. As far as cost goes, the intended matrix sizes for nalgebra are small (dim<5) will be cheap for potential alloc and copies, so an accessor with cloning is cheaper than computing cholesky decomp or inversion. A possible intermediate for those who need the precomputed values as is: a EDIT Quoting myself in #186
And I just realized that I'm giving you mixed messages on copy being opt-in, aren't I? 🤔 Hmm. I think I need someone else's input here. In what cases might you want to view the precompute outside of the features we have already implemented? |
|
Hi, I will keep an eye on this PR. Let me know the conclusion. |
|
The precompute for the precision matrix is fairly common, so I'm no longer concerned that it's leaking implementation unnecessarily, so a borrow seems good there. I don't know if it's common enough to store the cholesky |
|
Hey, sorry just getting back to this. Would you change the cholesky decomp "accessor" to be named, This way it can be there if it's convenient but we aren't tied into having that precompute represented exactly by that type. |
|
Hi, I have updated the name along with relevant refactoring. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #316 +/- ##
==========================================
+ Coverage 93.81% 95.27% +1.45%
==========================================
Files 53 60 +7
Lines 11996 14283 +2287
==========================================
+ Hits 11254 13608 +2354
+ Misses 742 675 -67 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Great! Thanks for this |
Hi, this PR fixes #186. I have implemented the accessor methods for the following distributions,