diff --git a/analysis/examine_newsgroups_more.R b/analysis/examine_newsgroups_more.R index f748a4d..e03f07d 100644 --- a/analysis/examine_newsgroups_more.R +++ b/analysis/examine_newsgroups_more.R @@ -1,3 +1,4 @@ +# For paper, highlight results with K = 10. library(fastTopics) library(cowplot) set.seed(1) @@ -10,18 +11,13 @@ n <- nrow(fit1$L) rows <- sample(n,2000) fit1 <- select_loadings(fit1,rows) fit2 <- select_loadings(fit2,rows) -tsne <- tsne_from_topics(fit1,dims = 1,verbose = FALSE) -p1 <- structure_plot(fit1,loadings_order = order(tsne[,1]),topics = 1:k, - grouping = topics[rows]) -p2 <- structure_plot(fit2,loadings_order = order(tsne[,1]),topics = 1:k, - grouping = topics[rows]) +p1 <- structure_plot(fit1,topics = 1:k,grouping = topics[rows]) +p2 <- structure_plot(fit2,topics = 1:k,grouping = topics[rows]) plot_grid(p1,p2,nrow = 2,ncol = 1) lda1 <- readRDS("../output/newsgroups/rds/lda-newsgroups-em-k=10.rds")$lda lda2 <- readRDS("../output/newsgroups/rds/lda-newsgroups-scd-ex-k=10.rds")$lda cor(lda1@gamma,lda2@gamma) -p3 <- structure_plot(lda1@gamma[rows,],loadings_order = order(tsne[,1]), - topics = 1:k) -p4 <- structure_plot(lda2@gamma[rows,],loadings_order = order(tsne[,1]), - topics = 1:k) +p3 <- structure_plot(lda1@gamma[rows,],topics = 1:k) +p4 <- structure_plot(lda2@gamma[rows,],topics = 1:k) plot_grid(p1,p2,p3,p4,nrow = 4,ncol = 1) diff --git a/analysis/examine_pbmc68k_more.R b/analysis/examine_pbmc68k_more.R index ee0a04a..e1962e6 100644 --- a/analysis/examine_pbmc68k_more.R +++ b/analysis/examine_pbmc68k_more.R @@ -1,3 +1,4 @@ +# For paper, highlight results with K = 11. library(fastTopics) library(cowplot) set.seed(1)