Skip to content

Commit

Permalink
Merge branch 'master' into add-configure
Browse files Browse the repository at this point in the history
  • Loading branch information
koheiw authored Sep 4, 2024
2 parents a913f78 + 7287e09 commit 9feee8d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/testthat/test-textmodel_lda.R
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,12 @@ test_that("adjust_alpha works", {

set.seed(1234)
lda <- textmodel_lda(dfmt, max_iter = 200, adjust_alpha = 0.5)

expect_equivalent(rowSums(lda$theta), rep(1.0, ndoc(lda$data)))
expect_equivalent(rowSums(lda$phi), rep(1.0, lda$k))

expect_equal(lda$adjust_alpha, 0.5)
expect_true(all(lda$alpha != 0.5))
expect_true(all(lda$alpha > 0.25))
expect_true(all(lda$epsilon > 0))

expect_error(
Expand Down

0 comments on commit 9feee8d

Please sign in to comment.