Skip to content

Commit

Permalink
Load scales in a visible chunk. Closes #71.
Browse files Browse the repository at this point in the history
  • Loading branch information
juliasilge committed Nov 24, 2019
1 parent ac93c3f commit 54b8cac
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions 06-topic-models.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,8 @@ assignments
This combination of the true book (`title`) and the book assigned to it (`consensus`) is useful for further exploration. We can, for example, visualize a **confusion matrix**, showing how often words from one book were assigned to another, using dplyr's `count()` and ggplot2's `geom_tile` (Figure \@ref(fig:confusionmatrix).

```{r confusionmatrix, dependson = "assignments2", fig.width = 10, fig.height = 8, fig.cap = "Confusion matrix showing where LDA assigned the words from each book. Each row of this table represents the true book each word came from, and each column represents what book it was assigned to."}
library(scales)
assignments %>%
count(title, consensus, wt = count) %>%
group_by(title) %>%
Expand Down

0 comments on commit 54b8cac

Please sign in to comment.