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 object) Model info (e.g., saved output from textTrain, textTrainRegression or textRandomForest).

word_embeddings

(tibble) Word embeddings

x_append

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

type

(string) Type of prediction; e.g., "prob", "class".

dim_names

(boolean) Account for specific dimension names from textEmbed() (rather than generic names including Dim1, Dim2 etc.). If FALSE the models need to have been trained on word embeddings created with dim_names FALSE, so that embeddings were only called 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