spateo-release icon indicating copy to clipboard operation
spateo-release copied to clipboard

pis shape was not right

Open DruncBread opened this issue 1 year ago • 2 comments

Hi,

I encounterd a problem when checking the result of alignment

Image

This is adata_list (4 Anndata) AnnData object with n_obs × n_vars = 747 × 24356 AnnData object with n_obs × n_vars = 1966 × 24356 AnnData object with n_obs × n_vars = 1916 × 24356 AnnData object with n_obs × n_vars = 1967 × 24356

I tried printing out the shape of pis and they seemed not right

Image

DruncBread avatar Feb 15 '25 08:02 DruncBread

Hi @DruncBread, thank you for raising this issue. In Spateo, we typically use SVI (Stochastic Variational Inference) for optimization. This means that parameter updates are computed using subsets of the data to reduce computational time.

For the final output, we provide an option to return the complete mapping matrix by setting return_mapping=True. This will generate an NxM mapping matrix but may take slightly more time. Since the mapping matrix is generally not commonly used in alignment tasks, the default setting is return_mapping=False. You can try setting return_mapping=True to obtain the mapping matrix.

Another possible approach is to set SVI=False, which will also return the NxM mapping matrix. However, this is not recommended as it will consume significantly more time and computational resources

YifanLu2000 avatar Feb 18 '25 00:02 YifanLu2000

Hi,

Thank you for your reply. I tried setting return_mapping=True and the problem was solved. Thank you very much for your guidance!

Best regards.

DruncBread avatar Feb 18 '25 09:02 DruncBread