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

Description Usage Arguments Value Author(s) See Also Examples

View source: R/madlib-lda.R

Description

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

Usage

1
2
## S3 method for class '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.

Author(s)

Author: Predictive Analytics Team at Pivotal Inc.

Maintainer: Frank McQuillan, Pivotal Inc. [email protected]

See Also

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

Examples

1
2
3
4
## Not run: 
## Please see the examples in madlib.lda doc.

## End(Not run)

PivotalR documentation built on May 30, 2017, 8:18 a.m.