stereo.algorithm.ms_spa_track.MSSpaTrack.transfer_matrix¶
- MSSpaTrack.transfer_matrix(data1_index=None, data2_index=None, spatial_key='spatial', alpha=0.1, epsilon=0.01, rho=inf, G_1=None, G_2=None, **kwargs)[source]¶
Calculates transfer matrix between two time.
- Parameters:
data1_index (
Union[int,str,None]) – The index in the ms_data of the first data.data2_index (
Union[int,str,None]) – The index in the ms_data of the second data.spatial_key (
str) – The key to get position information of cells, defaults to ‘spatial’alpha (
float) – Alignment tuning parameter. Note:0 <= alpha <= 1. Whenalpha = 0only the gene expression data is taken into account, whilealpha =1only the spatial coordinates are taken into account.epsilon (
float) – Weight for entropy regularization term, defaults to 0.01rho (
float) – Weight for KL divergence penalizing unbalanced transport, defaults to np.infG_1 (
Optional[float]) – Distance matrix within spatial data 1 (spots, spots), defaults to NoneG_2 (
Optional[float]) – Distance matrix within spatial data 2 (spots, spots), defaults to None