# NOT RUN {
# Example on a data sample
x <- dplyr::sample_n(travelers[,-1],900)
out <- nmfem_mult(x, H = 4, K = 7)
# Display first cluster profile
display_profile(t((out$Theta %*% out$Lambda)[ ,1]))
# Display first word profile
display_profile(t(out$Theta[ ,1]), color = "Greens")
# Example on the complete data - it needs a few minutes to run
# }
# NOT RUN {
nmfem_travelers <- nmfem_mult(travelers[ ,-1], H = 5, K = 10)
Theta <- nmfem_travelers$Theta
Lambda <- nmfem_travelers$Lambda
# Display first cluster profile
display_profile(t((Theta %*% Lambda)[ ,1]))
# Display first word profile
display_profile(t(Theta[ ,1]), color = "Greens")
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab