Learn R Programming

text (version 1.0)

textTrainLists: Individually trains word embeddings from several text variables to several numeric or categorical variables. It is possible to have word embeddings from one text variable and several numeric/categprical variables; or vice verse, word embeddings from several text variables to one numeric/categorical variable. It is not possible to mix numeric and categorical variables.

Description

Individually trains word embeddings from several text variables to several numeric or categorical variables. It is possible to have word embeddings from one text variable and several numeric/categprical variables; or vice verse, word embeddings from several text variables to one numeric/categorical variable. It is not possible to mix numeric and categorical variables.

Usage

textTrainLists(
  x,
  y,
  force_train_method = "automatic",
  save_output = "all",
  method_cor = "pearson",
  eval_measure = "rmse",
  p_adjust_method = "holm",
  ...
)

Value

Correlations between predicted and observed values.

Arguments

x

Word embeddings from textEmbed (or textEmbedLayerAggreation).

y

Tibble with several numeric or categorical variables to predict. Please note that you cannot mix numeric and categorical variables.

force_train_method

Default is "automatic"; see also "regression" and "random_forest".

save_output

Option not to save all output; default "all". see also "only_results" and "only_results_predictions".

method_cor

A character string describing type of correlation (default "Pearson").

eval_measure

Type of evaluative measure to assess models on.

p_adjust_method

Method to adjust/correct p-values for multiple comparisons (default = "holm"; see also "none", "hochberg", "hommel", "bonferroni", "BH", "BY", "fdr").

...

Arguments from textTrainRegression or textTrainRandomForest the textTrain function.

See Also

see textTrain textTrainRegression textTrainRandomForest

Examples

Run this code
if (FALSE) {
word_embeddings <- word_embeddings_4$texts[1:2]
ratings_data <- Language_based_assessment_data_8[5:6]
results <- textTrainLists(
  x = word_embeddings,
  y = ratings_data
)
results
comment(results)
}

Run the code above in your browser using DataLab