predict.sento_model: Make predictions from a sento_model object

Description Usage Arguments Value Author(s) See Also

View source: R/sentomodel.R

Description

Prediction method for sento_model class, with usage along the lines of predict.glmnet, but simplified in terms of parameters.

Usage

1
2
## S3 method for class 'sento_model'
predict(object, newx, type = "response", offset = NULL, ...)

Arguments

object

a sento_model object created with sento_model.

newx

a data matrix used for the prediction(s), row-by-row; see predict.glmnet. The number of columns should be equal to sum(sento_model$nVar), being the number of original sentiment measures and other variables. The variables discarded in the regression process are dealt with within this function, based on sento_model$discarded.

type

type of prediction required, a value from c("link", "response", "class"), see documentation for predict.glmnet.

offset

not used.

...

not used.

Value

A prediction output depending on the type argument.

Author(s)

Samuel Borms

See Also

predict.glmnet, sento_model


sentometrics documentation built on April 20, 2021, 1:12 a.m.