Description Usage Arguments Details Value
View source: R/eval_function.R
Transforms an evaluation function valid for a single model, segment and target, into a function that applies on each combination of models, segments and targets.
1 | wrap_simple_eval(simple_eval_fun, unnest = TRUE, ...)
|
simple_eval_fun |
function(eval_frame). A function which takes an input data.frame that corresponds to an evaluation frame. |
unnest |
If false, results are in a list column named "evaluation". If true, results are unnested depending on class of output. Vectors of size >2 are gathered to two columns ("evaluation" and "evaluation_name"), as do lists of size >2, with the difference that the "evaluation" column remains a list column for the later. Data.frames are spread across multiple columns and possibly multiple rows if the data.frame has several rows. Be sure to insert a header row in this case. Vectors and lists of size 1 creates an "evaluation name" column only if they are named. |
... |
Additional named arguments passed to simple_eval_fun. When wrapping the function, these arguments are constant over all (model x target_type x segment) combinations. |
The input function can be multi-output. If unnest = FALSE, the output is encapsulated into a list column. If unnest = TRUE, then the results are unnested, in a way depending of the class of the output. See Assesser documentation for additional details on unnesting.
An evaluation function that can be used on any eval_frame type data.frame.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.