-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Store Cholesky of the OIM rather than separate matrices
Currently we're storing both the (observed) Fisher information matrix and its inverse, the variance-covariance matrix, separately in the `CoxModel` object. Since we know the observed information is positive semi-definite, we can instead store a (possibly pivoted) Cholesky factorization of the information. That allows us to easily construct both the original matrix and its inverse without needing to store both. In the case of few parameters (like ≤3) and positive semi-definite information but not positive definite, this will actually use a bit more memory than storing the matrices separately. However, for any more parameters, regardless of whether the information is positive definite, this saves a good amount of memory, with the difference becoming more pronounced with more parameters.
- Loading branch information
Showing
2 changed files
with
26 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters