predict.lda {PivotalR} | R Documentation

## 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 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. fmcquillan@pivotal.io

### See Also

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

### Examples

    ## Not run:
    ## Please see the examples in madlib.lda doc.

    ## End(Not run)

[Package PivotalR version 0.1.18.3.1 Index]