Learn R Programming

PivotalR (version 0.1.18.5)

predict.lda: Prediction function for MADlib's LDA models

Description

Labelling test documents using a learned LDA model built by linlk{madlib.lda}

Usage

# S3 method for lda.madlib
predict(object, data, docid, words, ...)

Arguments

object

The result of madlib.lda.

data

An object of db.obj class. This is the database table containing the documents on which the algorithm will predict. The text of each document should be tokenized into 'words'.

docid

Text name of the column containing the id of the documents.

words

Column name of the input data table containing the vector of words/tokens in the documents.

Arguments passed to or from other methods, not implemented yet.

Value

A '>db.table object, which points to a table that contains the predicted values. The table has the following columns: docid wordcount words counts topic_count topic_assignment

One can use the function lk to look at the values.

See Also

madlib.lda builds a topic model using a set of documents.

Examples

Run this code
# NOT RUN {
## Please see the examples in madlib.lda doc.
# }

Run the code above in your browser using DataLab