Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport PR #1479 on branch 0.15.x (Fix LDA note bugs) #1481

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/user_guide/models/amortizedlda.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ The limitations of amortized LDA include:

## Preliminaries

Amortized LDA takes as input a cell-by-feature matrix $X$ with $N$ cells and $F$ features.
Amortized LDA takes as input a cell-by-feature matrix $X$ with $C$ cells and $F$ features.
Because the LDA model assumes the input is ordered, we refer to this format as the bag-of-words (BoW) representation
of the feature counts.
Additionally, the number of topics to model must be manually set by the user prior to fitting the model.

## Generative process

Amortized LDA posits that the $N$ observed feature counts for cell $c$ are treated as ordered. For all $n \in [N]$ feature counts
for cell $c$, the observed feature counts $x_{cn}$ are produced according to the following generative process:
for cell $c \in [C]$, the observed feature counts $x_{cn}$ are produced according to the following generative process:

```{math}
:nowrap: true
Expand Down Expand Up @@ -99,7 +99,7 @@ Users can retrieve the estimated topic proportions in each cell with the followi

```
>>> topic_prop = model.get_latent_representation()
>>> adata.obsm\["X_LDA"\] = topic_prop
>>> adata.obsm["X_LDA"] = topic_prop
```

Due to the logistic-Normal distribution not having an analytic solution to the mean, we compute
Expand Down