This function selects language examples that been used in the textTrain() or textAssess() functions.
Usage
textTrainExamples(
text,
x_variable,
y_variable = NULL,
type = "default",
n_tile = 4,
n_examples = 5,
jitter = NULL,
filter_words = NULL,
target_color = "darkgreen",
predictions_color = "darkblue",
error_color = "darkred",
distribution_color = c("#00508c", "#805259", "#a71200", "#0a6882", "#a4a4a4",
"#e04b39", "#19956e", "#22a567", "#5c8a59"),
figure_format = "svg",
scatter_legend_dot_size = 3,
scatter_legend_bg_dot_size = 2,
scatter_show_axis_values = TRUE,
x_axis_range = NULL,
y_axis_range = NULL,
grid_legend_x_axes_label = NULL,
grid_legend_y_axes_label = NULL,
seed = 42
)
textPredictExamples(
text,
x_variable,
y_variable = NULL,
type = "default",
n_tile = 4,
n_examples = 5,
jitter = NULL,
filter_words = NULL,
target_color = "darkgreen",
predictions_color = "darkblue",
error_color = "darkred",
distribution_color = c("#00508c", "#805259", "#a71200", "#0a6882", "#a4a4a4",
"#e04b39", "#19956e", "#22a567", "#5c8a59"),
figure_format = "svg",
scatter_legend_dot_size = 3,
scatter_legend_bg_dot_size = 2,
scatter_show_axis_values = TRUE,
x_axis_range = NULL,
y_axis_range = NULL,
grid_legend_x_axes_label = NULL,
grid_legend_y_axes_label = NULL,
seed = 42
)
Arguments
- text
(string) the language that was used for prediction/assessment/classification.
- x_variable
(numeric) the variable used for training (y).
- y_variable
(numeric) the outcome from the model (i.e., y_hat).
- type
(string) if set to "prediction_errors", two extra plots is provided: distribution of scores and absolute error.
- n_tile
(integer) the n tile to split the data in (to show the most extreme tiles in different colours).
- n_examples
(integer) the number of language examples to show.
- jitter
(integer) the percentage of jitter to add to the data for the scatter plot.
- filter_words
(character vector) words required to be included in examples.
- target_color
(string)
- predictions_color
(string) = "darkblue",
- error_color
= (string) "darkred",
- distribution_color
(string) colors of the distribution plot
- figure_format
(string) file format of the figures.
- scatter_legend_dot_size
(integer) The size of dots in the scatter legend.
- scatter_legend_bg_dot_size
(integer) The size of background dots in the scatter legend. For example: c(1,0,1) result in one dot in each quadrant except for the middle quadrant.
- scatter_show_axis_values
(boolean) If TRUE, the estimate values are shown on the distribution plot axes.
- x_axis_range
(numeric vector) range of x axis (e.g., c(1, 100)).
- y_axis_range
(numeric vector) range of y axis (e.g., c(1, 100)).
- grid_legend_x_axes_label
x-axis label of the grid topic plot.
- grid_legend_y_axes_label
y-axis label of the grid topic plot.
- seed
(integer) The seed to set for reproducibility.