lueckenlab / patpy

BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Fix/update mrvi version #63

Closed farhadmd7 closed 2 months ago

farhadmd7 commented 2 months ago

2 different distances are calculated here and stored

first stored like following only if calculate_representations is set true when calling calculate_distance_matrix(calculate_representations= True) , here first patient embeddings are obtained from MRVI, then aggregated and then distance matrix is calculated self.adata.uns[self.DISTANCES_UNS_KEY + "_approach1"] = distances

second approach which is app. suggested in the MRVI paper, first distances are calculated by MRVI then aggregated which is stored by defaultl in self.adata.uns[self.DISTANCES_UNS_KEY

VladimirShitov commented 2 months ago

Thanks! Looks good to me. Please always ensure that the order of the samples is the same in the model and in the class. It is a very typical mistake (I made it several times already 😅). Here, I fixed it and also gave a bit more interpretable name to a different distances calculation approach