Skip to content

Commit fd458dd

Browse files
committed
...
1 parent e582d0b commit fd458dd

4 files changed

Lines changed: 8 additions & 0 deletions

File tree

R/PredictionClassif.R

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
#' @export
2727
#' @examples
2828
#' \donttest{
29+
#' if (mlr3misc::require_namespaces("precrec", quietly = TRUE)) {
2930
#' task = tsk("spam")
3031
#' learner = lrn("classif.rpart", predict_type = "prob")
3132
#' object = learner$train(task)$predict(task)
@@ -35,6 +36,7 @@
3536
#' autoplot(object, type = "roc")
3637
#' autoplot(object, type = "prc")
3738
#' }
39+
#' }
3840
autoplot.PredictionClassif = function(object, type = "stacked", measure = NULL, theme = theme_minimal(), ...) { # nolint
3941
assert_choice(type, choices = c("stacked", "roc", "prc", "threshold"), null.ok = FALSE)
4042

R/TaskClassif.R

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,14 @@
2020
#'
2121
#' @export
2222
#' @examples
23+
#' if (mlr3misc::require_namespaces("GGally", quietly = TRUE)) {
2324
#' task = tsk("iris")
2425
#'
2526
#' head(fortify(task))
2627
#' autoplot(task)
2728
#' autoplot(task$clone()$select(c("Sepal.Length", "Sepal.Width")), type = "pairs")
2829
#' autoplot(task, type = "duo")
30+
#' }
2931
autoplot.TaskClassif = function(object, type = "target", theme = theme_minimal(), ...) { # nolint
3032
assert_choice(type, choices = c("target", "duo", "pairs"), null.ok = FALSE)
3133

man/autoplot.PredictionClassif.Rd

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/autoplot.TaskClassif.Rd

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)