diff --git a/R/BenchmarkResult.R b/R/BenchmarkResult.R index cc34c9f1..2ecba56c 100644 --- a/R/BenchmarkResult.R +++ b/R/BenchmarkResult.R @@ -33,8 +33,8 @@ #' #' head(fortify(object)) #' autoplot(object) -#' autoplot(object$clone()$filter(task_ids = "spam"), type = "roc") -#' autoplot(object$clone()$filter(task_ids = "pima"), type = "prc") +#' autoplot(object$clone(deep = TRUE)$filter(task_ids = "spam"), type = "roc") +#' autoplot(object$clone(deep = TRUE)$filter(task_ids = "pima"), type = "prc") autoplot.BenchmarkResult = function(object, # nolint type = "boxplot", measure = NULL, diff --git a/R/as_precrec.R b/R/as_precrec.R index 848ab3b4..232f7103 100644 --- a/R/as_precrec.R +++ b/R/as_precrec.R @@ -66,7 +66,7 @@ as_precrec.BenchmarkResult = function(object) { # nolint stopf("Unable to convert benchmark results with multiple resamplings.") } - predictions = map(scores$prediction, "test") + predictions = scores$prediction data = transpose_list(map(predictions, roc_data)) data$labels = split(data$labels, scores$iteration) data$scores = split(data$scores, scores$iteration) diff --git a/man/autoplot.BenchmarkResult.Rd b/man/autoplot.BenchmarkResult.Rd index 35621a96..2722fdf0 100644 --- a/man/autoplot.BenchmarkResult.Rd +++ b/man/autoplot.BenchmarkResult.Rd @@ -46,6 +46,6 @@ object = benchmark(benchmark_grid(tasks, learner, resampling)) head(fortify(object)) autoplot(object) -autoplot(object$clone()$filter(task_ids = "spam"), type = "roc") -autoplot(object$clone()$filter(task_ids = "pima"), type = "prc") +autoplot(object$clone(deep = TRUE)$filter(task_ids = "spam"), type = "roc") +autoplot(object$clone(deep = TRUE)$filter(task_ids = "pima"), type = "prc") } diff --git a/man/autoplot.LearnerClassifRpart.Rd b/man/autoplot.LearnerClassifRpart.Rd index 80065ab8..5fa1d993 100644 --- a/man/autoplot.LearnerClassifRpart.Rd +++ b/man/autoplot.LearnerClassifRpart.Rd @@ -10,7 +10,7 @@ \method{autoplot}{LearnerRegrRpart}(object, ...) } \arguments{ -\item{object}{(\link[mlr3:mlr_learners_classif.rpart]{mlr3::LearnerClassifRpart} | \link[mlr3:mlr_learners_regr.rpart]{mlr3::LearnerRegrRpart}).} +\item{object}{(\link[mlr3:LearnerClassifRpart]{mlr3::LearnerClassifRpart} | \link[mlr3:LearnerRegrRpart]{mlr3::LearnerRegrRpart}).} \item{...}{(\code{any}): Additional arguments, passed down to \code{\link[ggparty:autoplot.party]{ggparty::autoplot.party()}}.}