Skip to content

Commit 397cde3

Browse files
add range to error assessment
1 parent 312de82 commit 397cde3

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

R/assessment_plots.R

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,18 +49,24 @@ make_target_err_plot <- function(job_assess, target) {
4949
d <- job_assess$measures
5050
d[["y"]] <- d[[paste0("mean_err__", target)]]
5151
d[["ys"]] <- d[[paste0("sd_err__", target)]]
52+
d[["ymin"]] <- d[[paste0("min_err__", target)]]
53+
d[["ymax"]] <- d[[paste0("max_err__", target)]]
5254
ggplot2::ggplot(d, ggplot2::aes(x = .data$iteration, y = .data$y)) +
5355
ggplot2::geom_line() +
5456
ggplot2::geom_ribbon(
55-
ggplot2::aes(ymin = .data$y - .data$ys, ymax = .data$y + .data$ys),
57+
ggplot2::aes(ymin = .data$y - .data$ys, ymax = .data$y + .data$ys),
5658
alpha = 0.3
5759
) +
60+
ggplot2::geom_ribbon(
61+
ggplot2::aes(ymin = .data$ymin, ymax = .data$ymax),
62+
alpha = 0.1
63+
) +
5864
ggplot2::geom_hline(yintercept = 0, linetype = "dashed") +
5965
ggplot2::theme_light() +
6066
ggplot2::labs(
6167
title = paste0("Mean Error on: ", target),
6268
x = "Iteration",
63-
y = "Error \n(mean + sd)"
69+
y = "Error \n(mean + sd + range)"
6470
)
6571
}
6672

R/assessments.R

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,8 @@ make_job_assessment <- function(calib_object, job, results) {
8080
out$measures[paste0("spread__", names(spreads))] <- as.list(spreads)
8181
out$measures[paste0("mean_err__", job$targets)] <- lapply(errors, mean)
8282
out$measures[paste0("sd_err__", job$targets)] <- lapply(errors, sd)
83+
out$measures[paste0("min_err__", job$targets)] <- lapply(errors, min)
84+
out$measures[paste0("max_err__", job$targets)] <- lapply(errors, max)
8385

8486
out
8587
}

0 commit comments

Comments
 (0)