predict.textmodel_svm: Prediction from a fitted textmodel_svm object

Description Usage Arguments Value See Also

View source: R/textmodel_svm.R

Description

predict.textmodel_svm() implements class predictions from a fitted linear SVM model.

Usage

1
2
3
4
5
6
7
8
## S3 method for class 'textmodel_svm'
predict(
  object,
  newdata = NULL,
  type = c("class", "probability"),
  force = TRUE,
  ...
)

Arguments

object

a fitted linear SVM textmodel

newdata

dfm on which prediction should be made

type

the type of predicted values to be returned; see Value

force

make newdata's feature set conformant to the model terms

...

not used

Value

predict.textmodel_svm returns either a vector of class predictions for each row of newdata (when type = "class"), or a document-by-class matrix of class probabilities (when type = "probability").

See Also

textmodel_svm()


quanteda.textmodels documentation built on April 6, 2021, 9:06 a.m.