Skip to content

Commit

Permalink
remove a task + some unused dependencies from Suggests
Browse files Browse the repository at this point in the history
  • Loading branch information
bblodfon committed Dec 31, 2024
1 parent b43e7d6 commit f3fc9a9
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 114 deletions.
57 changes: 0 additions & 57 deletions .pre-commit-config.yaml

This file was deleted.

3 changes: 0 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ Imports:
Rcpp (>= 1.0.4),
survival
Suggests:
bujar,
GGally,
knitr,
lgr,
Expand All @@ -79,9 +78,7 @@ Suggests:
simsurv,
survAUC,
testthat (>= 3.0.0),
vdiffr,
abind,
Ecdat,
coxed,
mlr3learners,
pammtools
Expand Down
32 changes: 0 additions & 32 deletions R/TaskSurv_zzz.R
Original file line number Diff line number Diff line change
Expand Up @@ -163,38 +163,6 @@ load_rats = function() {
task
}

#' @title Unemployment Duration Survival Task
#'
#' @name mlr_tasks_unemployment
#'
#' @templateVar type Surv
#' @templateVar task_type survival
#' @templateVar id unemployment
#' @templateVar data Ecdat::UnempDur
#' @template task
#' @template seealso_task
#'
#' @section Preprocessing:
#' - Only the columns `spell`, `censor1`, `age`, `logwage`, `tenure`, `ui` are
#' kept in this task.
#' - Renamed target columns from (`spell`, `censor1`) to (`time`, `status`), so
#' outcome is the duration until re-employment in a full-time job.
NULL

load_unemployment = function() {
path = file.path(system.file("extdata", package = "mlr3proba"), "unemployment.rds")
data = readRDS(path)
colnames(data)[colnames(data) == "spell"] = "time"
colnames(data)[colnames(data) == "censor1"] = "status"

b = as_data_backend(data)
task = TaskSurv$new("unemployment", b, time = "time", event = "status",
label = "Unemployment Duration")
b$hash = task$man = "mlr3proba::mlr_tasks_unemployment"

task
}

#' @title Lung Cancer Survival Task
#'
#' @name mlr_tasks_lung
Expand Down
12 changes: 0 additions & 12 deletions inst/data-raw/unemployment.R

This file was deleted.

Binary file removed inst/extdata/unemployment.rds
Binary file not shown.
10 changes: 0 additions & 10 deletions tests/testthat/test_autoplot.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,12 @@ test_that("autoplot.PredictionSurv", {

p = autoplot(prediction, type = "calib", task = task)
expect_true(is.ggplot(p))
# vdiffr::expect_doppelganger("predictionsurv_calib", p)

p = autoplot(prediction, type = "dcalib", extend_quantile = TRUE)
expect_true(is.ggplot(p))
# vdiffr::expect_doppelganger("predictionsurv_dcalib", p)

p = autoplot(prediction, type = "preds")
expect_true(is.ggplot(p))
# vdiffr::expect_doppelganger("predictionsurv_preds", p)
})

test_that("autoplot.TaskDens", {
Expand All @@ -26,19 +23,15 @@ test_that("autoplot.TaskDens", {

p = autoplot(task, type = "dens")
expect_true(is.ggplot(p))
# vdiffr::expect_doppelganger("taskdens_dens", p)

p = autoplot(task, type = "freq")
expect_true(is.ggplot(p))
# vdiffr::expect_doppelganger("taskdens_freq", p)

p = autoplot(task, type = "overlay")
expect_true(is.ggplot(p))
# vdiffr::expect_doppelganger("taskdens_overlay", p)

p = autoplot(task, type = "freqpoly")
expect_true(is.ggplot(p))
# vdiffr::expect_doppelganger("taskdens_freqpoly", p)
})

test_that("autoplot.TaskSurv", {
Expand All @@ -49,13 +42,10 @@ test_that("autoplot.TaskSurv", {

p = autoplot(task, type = "target")
expect_true(is.ggplot(p))
# vdiffr::expect_doppelganger("tasksurv_target", p)

p = autoplot(task, type = "pairs")
expect_s3_class(p, "ggmatrix")
# vdiffr::expect_doppelganger("tasksurv_ggmatrix", p)

p = autoplot(task, type = "duo")
expect_s3_class(p, "ggmatrix")
# vdiffr::expect_doppelganger("tasksurv_duo", p)
})

0 comments on commit f3fc9a9

Please sign in to comment.