Description Usage Arguments Details Value Wrapped output and Unnesting behavior
View source: R/eval_function.R
Stores functions and options used to evaluate a model.
1 2 3 |
eval_fun |
:: 'function(1)' |
plot_fun |
:: 'function(1)' |
cv_summary_fun |
:: work in progress |
wrap_eval_fun |
:: 'logical(1)' |
unnest |
:: 'logical(1)' |
compulsory_fields |
:: 'character()' |
additional_eval_parameters |
:: 'list(any)' |
additional_plot_parameters |
:: 'list(any)' |
The evaluation separates two steps. First, the eval_fun
evaluation
function summarizes different metrics for each combination of (model x
target x segment). The result of this evaluation is given as a
dataframe, which is in turn optionnaly passed to a plotting function.
wrap_eval_fun
is an option to define how eval_fun is applied;
unnest
is an option to define if the output should be simplified.
An S3-object of class "eval_functions"
If wrap_eval_fun, then the output (before unnesting) will be a dataframe with columns "model", "target_type", "segment", and "evaluation". Each row has a unique combination of (model x target_type x segment). Evaluation is a list column, with for each row the result of the evaluation function.
The list column can automatically unnested if unnest = TRUE. Unnesting works for the following output types of the evaluation function: * If the output is dimension 1 and length 1, the list column is simply replaced by a column of the same type than this output. * If the output is a (named) vector, then the list column is gathered, into an evaluation column of the same type as the vector and an evaluation_type column with the same names. * If the output is a (named) list, then the list column is gathered, into an evaluation column of type list (even if the list items have same type: in this case, prefer a named vector), and an evaluation_type column with the same names. * If the output is a dataframe, then the data.frame columns are spread in several columns, keeping the dataframe column names. Row names are lost (are they ? TODO)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.