Open Yansr3 opened 9 months ago
I'm currently experiencing the same error and I have not yet been able to determine what is causing it.
Hi all, can you provide the scipy and mira versions which you are using?
Sometimes this issue arises because of scipy, sometimes because of the underlying topology of the diffusion graph. If you try selecting different start and end cells (by choosing a nearest neighbor, perhaps), does that work?
This happened with scipy 1.10.1 and mira 2.1.1
Changing the start and end cells didn't resolve the issue. In the end I tried switching to the pseudo-inverse of the matrix (as palantir has a similar exception), I assumed it was Hermitian so I used the pinvh function from scipy (numpy pinv kept crashing my pc) , which produced some results.
from numpy.linalg import inv, LinAlgError from scipy.linalg import pinvh try: N = inv(mat) except LinAlgError: N = pinvh(mat)
Since this part is based on palantir I also used ran it with the mira topic model results, and the palantir results were quite different from what I got with mira, which makes me wonder what I'm doing wrong.
Honestly, none of this math stuff is my forte, so I don't understand it much.
I'm also using scipy 1.10.1 and mira 2.1.1. It worked for all my cells, and some subsets of the cells. I encountered this problem for some subsets of cells.
I was trying to carte lineage tree and calculate branch probabilities with mira.time.get_branch_probabilities using terminal cells detected from mira.time.find_terminal_cells. I got the error of "LinAlgError: Singular matrix" for some of my data. May I ask for some advice for creating the tree?