predict.textmodel_wordmap | R Documentation |

Predict document class using fitted Wordmap models.

```
## S3 method for class 'textmodel_wordmap'
predict(
object,
newdata = NULL,
confidence = FALSE,
rank = 1L,
type = c("top", "all"),
rescale = FALSE,
min_conf = -Inf,
min_n = 0L,
...
)
```

`object` |
a model fitted by |

`newdata` |
a dfm on which prediction will be made. |

`confidence` |
if |

`rank` |
rank of the class to be predicted. Only used when |

`type` |
if |

`rescale` |
if |

`min_conf` |
returns |

`min_n` |
set the minimum number of polarity words in documents. |

`...` |
not used. |

Returns predicted classes as a vector. If `confidence = TRUE`

,
it returns a list of two vectors:

`class` |
predicted classes of documents. |

`confidence.fit` |
the confidence of predictions. |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.