Predict scores or classification from, e.g., textTrain.

textPredict(
  model_info,
  word_embeddings,
  x_append = NULL,
  type = NULL,
  dim_names = TRUE,
  ...
)

Arguments

model_info

Model info (e.g., saved output from textTrain, textTrainRegression or textRandomForest).

word_embeddings

Word embeddings

x_append

Variables to be appended after the word embeddings (x).

type

Type of prediction; e.g., "prob", "class".

dim_names

Account for specific dimension names from textEmbed (rather than generic names including Dim1, Dim2 etc.).

...

Setting from stats::predict can be called.

Value

Predicted scores from word embeddings.

Examples

word_embeddings <- word_embeddings_4
ratings_data <- Language_based_assessment_data_8