Description
The td_lda_topic_summary_mle
function displays readable information
from the binary model tbl_teradata generated by the Latent Dirichlet Allocation (LDA) function td_lda_mle
.
Usage
td_lda_topic_summary_mle ( object = NULL, summary = FALSE, out.topicwordnum = "all", word.weight = FALSE, word.count = FALSE, out.byword = TRUE, object.sequence.column = NULL, object.order.column = NULL )
Arguments
object |
Required Argument. |
object.order.column |
Optional Argument. |
summary |
Optional Argument. |
out.topicwordnum |
Optional Argument. |
word.weight |
Optional Argument. |
word.count |
Optional Argument. |
out.byword |
Optional Argument. |
object.sequence.column |
Optional Argument. |
Value
Function returns an object of class "td_lda_topic_summary_mle" which
is a named list containing Teradata tbl object.
Named list member can be referenced directly with the "$" operator
using name: result.
Examples
# Get the current context/connection con <- td_get_context()$connection # Load example data. loadExampleData("lda_example","complaints_traintoken") # Create remote tibble objects. complaints_traintoken <- tbl(con, "complaints_traintoken") # Example 1 - This function td_lda_topic_summary_mle uses the model table from td_lda_mle to display only a summary # of the information in the model table td_lda_out <- td_lda_mle(data=complaints_traintoken, docid.column='doc_id', word.column='token', topic.num=3, alpha=0.1, eta=0.1, maxiter=50, convergence.delta=0.0001, seed=2, out.topicnum='all', out.topicwordnum='none' ) td_lda_topic_summary_mle_out <- td_lda_topic_summary_mle(object = td_lda_out, summary = TRUE) # Example 2 - This function td_lda_topic_summary_mle uses to display all topic words and their topic identifiers # with each row contains a unique topic and all words that occur in that topic, separated by commas. td_lda_topic_summary_mle_out <- td_lda_topic_summary_mle(object = td_lda_out, out.topicwordnum = 'all', out.byword = TRUE ) # Example 3 - This function td_lda_topic_summary_mle uses to display each topic-word pair with wordweight, wordcount, # each topic-word pair in its own row. td_lda_topic_summary_mle_out <- td_lda_topic_summary_mle(object = td_lda_out, word.weight = TRUE, word.count = TRUE, out.byword = TRUE )