Replace `inverse_additive_relationships` with `pedigree_inverse_relationship`
See original GitHub issueSimilar to #895, depends on #891
The inverse additive relationship matrix (ARM) is a sparse matrix which shouldn’t require the full (dense) kinship matrix to be calculated in advance. The inverse ARM can be calculated from the same subset of parental kinships used to calculate the inbreeding coefficient in #891 and this should result in a similar speed up as seen in that PR.
Currently inverse_additive_relationships
returns the inverse ARM as a dense matrix, but ideally this would (optionally?) be returned as a sparse matrix. How do others feel about picking up pydata/sparse as a dependency?
Issue Analytics
- State:
- Created a year ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Setup up the inverse of additive relationship matrix in R
When doing the prediction of additive genetic values for pedigree members, we need the inverse of the so called numerator relationship ...
Read more >Inversion of a part of the numerator relationship matrix ... - NCBI
We propose an algorithm that sets up the sparsity pattern of T -1 using pedigree information. This algorithm provides positions of the elements...
Read more >relationshipAdditive: Additive relationship matrix and its inverse
relationshipAdditive creates additive relationship matrix, while inverseAdditive creates its inverse directly from a pedigree. kinship is another definition ...
Read more >Inversion of a part of the numerator relationship matrix using ...
Our main objective was to propose and evaluate methodology that takes advantage of any potential sparsity in the inverse of A22 in order...
Read more >Updating genetic relationship matrices and their inverses
Relationships among individuals are mod- elled via pedigree or genomic relationship matrices. (A or G, respectively). The inverse of these ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks, that’s a useful reference. AFAICT the scipy.sparse array classes still have issues integrating with dask/xarray. I think it’s probably best to stick to dense arrays for now and revisit sparse encodings later if/when there’s a clear performance benefit.
My main thought is that it’s not always obvious how to best get chunking and sparsity to play well together.
As the referenced issue shows, there were some performance issues with pydata sparse, so I ended up writing my own wrapper class. However, since then sparse array classes (in contrast to sparse matrices) have been added to scipy, so I would suggest we use those (assuming everything is 2D).