textPredict: Predict scores or classification from, e.g., textTrain.
Description
Predict scores or classification from, e.g., textTrain.
Usage
textPredict(
model_info,
word_embeddings,
x_append = NULL,
type = NULL,
dim_names = TRUE,
...
)
Value
Predicted scores from word embeddings.
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.
See Also
see textTrain
textTrainLists
textTrainRandomForest
Examples
Run this codeword_embeddings <- word_embeddings_4
ratings_data <- Language_based_assessment_data_8
Run the code above in your browser using DataLab