Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Allow matrix structure in covariance matrices to be exploited #1643
This PR provides adds a new method
Currently, we construct this covariance matrix explicitly, and solve these systems with a general-purpose solver. However, for many of the dependence structures, the linear algebra can be optimized to exploit the structure of the matrix.
We provide a default implementation of
We override this with optimized methods for the independence, autoregressive, and exchangeable cases.
The speed improvement would be most noticeable when the cluster sizes are large.
Tests for the independence and exchangeable cases match results obtained from R (as did the earlier code).
We don't have a comparator for the autoregressive case, so I added a regression test. It agrees with the results from the previous (non-optimized) implementation.
for consistency with the generic (and readability), i -> index
I'm not a big fan of
This looks like a clean branch according to the network tree, and can be merged with green button.
one more: can you inherit the docstring for the methods in the subclasses? for
I mentioned this in Frank's PR