stephenslab / fastTopics

Fast algorithms for fitting topic models and non-negative matrix factorizations to count data.
https://stephenslab.github.io/fastTopics
Other
77 stars 7 forks source link

fit_poisson_nmf error with k=2 #2

Closed jhsiao999 closed 4 years ago

jhsiao999 commented 4 years ago

@pcarbo I encountered the following error while fitting fit_poisson_nmf with k=2 (using scd and extrapolate=TRUE).

Error in combn(1:k0, k): length(m) == 1L is not TRUE
Traceback:

1. fit_poisson_nmf(tmp, k = 2, init_method = "topicscore", numiter = 100, 
 .     method = "scd", verbose = FALSE, control = list(extrapolate = TRUE))
2. init_poisson_nmf(X, k = k, init_method = init_method, control = control, 
 .     verbose = verbose)
3. topic_score(X, k)
4. vertex_hunting(R, k0, m)
5. combn(1:k0, k)
6. stopifnot(length(m) == 1L, is.numeric(m))
pcarbo commented 4 years ago

@jhsiao999 It should be fixed now—it was a pretty simple fix.