Transform_batch parameter of scVI's get_normalized_expression

Hi,

Is there an example available where the transform_batch argument of scVI’s get_normalized_expression method is used? Noticed that the link to the counterfactual prediction guide leads to a page under construction.

I am trying to better understand the effect of this argument.

Thanks!

We don’t have an explicit example unfortunately. But the idea behind scVI is that you hopefully learn a posterior distribution over the cells q(z \mid x, s) where s is the batch id of the cells, such that over the whole dataset, z is “corrected for batch effects”. I won’t go into full details of what this means, but scVI also learns a function (decoder) f(z, s) which is parameterized as a neural net. This function returns the gene expression frequencies for the cell. What we can do is arbitrarily pick s' \neq s and decode like f(z, s'). This would give a prediction for the gene expression of one cell as if it were collected in another batch.

Thanks for the response and the information regarding examples - the explanation of the corrected batch effects makes sense to me.