plot_eval {simulator} | R Documentation |
Plot a metric's value for each method
Description
When the evaluted metric is scalar-valued, this functions makes a boxplot of
this metric for each method. When the metric is vector-valued, this function
makes a curve with this metric on the y-axis, with one curve for each method
(the x-axis is the corresponding entry of that metric's vector). If evals is
a listofEvals
, then each model will be its own plot.
Usage
plot_eval(
object,
metric_name,
use_ggplot2 = TRUE,
main,
facet_mains,
ylab,
ylim,
include_zero = FALSE,
angle = 0,
...
)
Arguments
object |
an object of class |
metric_name |
the name of a metric to plot |
use_ggplot2 |
whether to use |
main |
title of plot. Default is |
facet_mains |
only to be used when evals is a |
ylab |
the y-axis label (default is |
ylim |
the y-axis limits to use (across all plots) |
include_zero |
whether ylim should include 0. Ignored if ylim is passed explicitly |
angle |
angle of labels (only when |
... |
additional arguments to pass to |
See Also
plot_evals
plot_eval_by
tabulate_eval
Examples
## Not run:
# suppose previously we had run the following:
sim <- new_simulation(name = "normal-example",
label = "Normal Mean Estimation",
dir = tempdir()) %>%
generate_model(make_my_example_model, n = 20) %>%
simulate_from_model(nsim = 50, index = 1:3) %>%
run_method(my_example_method) %>%
evaluate(my_example_loss)
# then we could plot this
plot_eval(sim, "myloss") # "myloss" is my_example_loss@name
## End(Not run)