predict.textmodel_svmlin()
implements class predictions from a fitted
linear SVM model.
# S3 method for textmodel_svmlin
predict(
object,
newdata = NULL,
type = c("class", "probability"),
force = FALSE,
...
)
predict.textmodel_svmlin
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"
).
a fitted linear SVM textmodel
dfm on which prediction should be made
the type of predicted values to be returned; see Value
logical, if TRUE
, make newdata's feature set conformant to the
model terms
not used
textmodel_svmlin()