Last updated on 2025-09-09 08:49:37 CEST.
Flavor | Version | Tinstall | Tcheck | Ttotal | Status | Flags |
---|---|---|---|---|---|---|
r-devel-linux-x86_64-debian-clang | 0.0.5 | 7.01 | 174.47 | 181.48 | OK | |
r-devel-linux-x86_64-debian-gcc | 0.0.5 | 4.49 | 147.56 | 152.05 | ERROR | |
r-devel-linux-x86_64-fedora-clang | 0.0.5 | 250.69 | ERROR | |||
r-devel-linux-x86_64-fedora-gcc | 0.0.5 | 376.09 | ERROR | |||
r-devel-windows-x86_64 | 0.0.5 | 8.00 | 338.00 | 346.00 | OK | |
r-patched-linux-x86_64 | 0.0.5 | 6.64 | 232.10 | 238.74 | OK | |
r-release-linux-x86_64 | 0.0.5 | 6.50 | 230.31 | 236.81 | OK | |
r-release-macos-arm64 | 0.0.5 | 159.00 | OK | |||
r-release-macos-x86_64 | 0.0.5 | 155.00 | OK | |||
r-release-windows-x86_64 | 0.0.5 | 8.00 | 338.00 | 346.00 | OK | |
r-oldrel-macos-arm64 | 0.0.5 | 113.00 | OK | |||
r-oldrel-macos-x86_64 | 0.0.5 | 167.00 | OK | |||
r-oldrel-windows-x86_64 | 0.0.5 | 11.00 | 471.00 | 482.00 | OK |
Version: 0.0.5
Check: examples
Result: ERROR
Running examples in ‘mlsurvlrnrs-Ex.R’ failed
The error most likely occurred in:
> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: LearnerSurvCoxPHCox
> ### Title: R6 Class to construct a Cox proportional hazards survival
> ### learner
> ### Aliases: LearnerSurvCoxPHCox
>
> ### ** Examples
>
> # survival analysis
>
> dataset <- survival::colon |>
+ data.table::as.data.table() |>
+ na.omit()
> dataset <- dataset[get("etype") == 2, ]
>
> seed <- 123
> surv_cols <- c("status", "time", "rx")
>
> feature_cols <- colnames(dataset)[3:(ncol(dataset) - 1)]
>
> split_vector <- splitTools::multi_strata(
+ df = dataset[, .SD, .SDcols = surv_cols],
+ strategy = "kmeans",
+ k = 4
+ )
>
> train_x <- model.matrix(
+ ~ -1 + .,
+ dataset[, .SD, .SDcols = setdiff(feature_cols, surv_cols[1:2])]
+ )
> train_y <- survival::Surv(
+ event = (dataset[, get("status")] |>
+ as.character() |>
+ as.integer()),
+ time = dataset[, get("time")],
+ type = "right"
+ )
>
> fold_list <- splitTools::create_folds(
+ y = split_vector,
+ k = 3,
+ type = "stratified",
+ seed = seed
+ )
>
>
> surv_coxph_cox_optimizer <- mlexperiments::MLCrossValidation$new(
+ learner = LearnerSurvCoxPHCox$new(),
+ fold_list = fold_list,
+ ncores = 1L,
+ seed = seed
+ )
> surv_coxph_cox_optimizer$performance_metric <- c_index
>
> # set data
> surv_coxph_cox_optimizer$set_data(
+ x = train_x,
+ y = train_y
+ )
>
> surv_coxph_cox_optimizer$execute()
CV fold: Fold1
Parameter 'ncores' is ignored for learner 'LearnerSurvCoxPHCox'.
CV fold: Fold2
Parameter 'ncores' is ignored for learner 'LearnerSurvCoxPHCox'.
CV fold: Fold3
Parameter 'ncores' is ignored for learner 'LearnerSurvCoxPHCox'.
Error: Package "measures" must be installed to use function 'metric_types_helper()'.
Execution halted
Flavor: r-devel-linux-x86_64-debian-gcc
Version: 0.0.5
Check: tests
Result: ERROR
Running ‘testthat.R’ [95s/311s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
> # This file is part of the standard setup for testthat.
> # It is recommended that you do not modify it.
> #
> # Where should you do additional test configuration?
> # Learn more about the roles of various files in:
> # * https://r-pkgs.org/tests.html
> # * https://testthat.r-lib.org/reference/test_package.html#special-files
>
> Sys.setenv("OMP_THREAD_LIMIT" = 2)
> Sys.setenv("Ncpu" = 2)
>
> library(testthat)
> library(mlsurvlrnrs)
>
> test_check("mlsurvlrnrs")
CV fold: Fold1
Parameter 'ncores' is ignored for learner 'LearnerSurvCoxPHCox'.
CV fold: Fold2
Parameter 'ncores' is ignored for learner 'LearnerSurvCoxPHCox'.
CV fold: Fold3
Parameter 'ncores' is ignored for learner 'LearnerSurvCoxPHCox'.
CV fold: Fold1
Registering parallel backend using 2 cores.
Running initial scoring function 6 times in 2 thread(s)... 6.851 seconds
Starting Epoch 1
1) Fitting Gaussian Process...
2) Running local optimum search... 1.238 seconds
3) Running FUN 2 times in 2 thread(s)... 1.162 seconds
CV fold: Fold2
Registering parallel backend using 2 cores.
Running initial scoring function 6 times in 2 thread(s)... 6.245 seconds
Starting Epoch 1
1) Fitting Gaussian Process...
2) Running local optimum search... 1.466 seconds
3) Running FUN 2 times in 2 thread(s)... 1.164 seconds
CV fold: Fold3
Registering parallel backend using 2 cores.
Running initial scoring function 6 times in 2 thread(s)... 5.49 seconds
Starting Epoch 1
1) Fitting Gaussian Process...
2) Running local optimum search... 0.736 seconds
3) Running FUN 2 times in 2 thread(s)... 0.777 seconds
CV fold: Fold1
Number of rows of initialization grid > than 'options("mlexperiments.bayesian.max_init")'...
... reducing initialization grid to 10 rows.
Registering parallel backend using 2 cores.
Running initial scoring function 10 times in 2 thread(s)... 7.787 seconds
Starting Epoch 1
1) Fitting Gaussian Process...
- Could not obtain meaningful lengthscales.
2) Running local optimum search...
- Convergence Not Found. Trying again with tighter parameters...
- Convergence Not Found. Trying again with tighter parameters... 10.502 seconds
3) Running FUN 2 times in 2 thread(s)... 0.758 seconds
CV fold: Fold2
Number of rows of initialization grid > than 'options("mlexperiments.bayesian.max_init")'...
... reducing initialization grid to 10 rows.
Registering parallel backend using 2 cores.
Running initial scoring function 10 times in 2 thread(s)... 5.735 seconds
Starting Epoch 1
1) Fitting Gaussian Process...
2) Running local optimum search... 14.874 seconds
3) Running FUN 2 times in 2 thread(s)... 0.795 seconds
CV fold: Fold3
Number of rows of initialization grid > than 'options("mlexperiments.bayesian.max_init")'...
... reducing initialization grid to 10 rows.
Registering parallel backend using 2 cores.
Running initial scoring function 10 times in 2 thread(s)... 5.179 seconds
Starting Epoch 1
1) Fitting Gaussian Process...
- Could not obtain meaningful lengthscales.
2) Running local optimum search... 0.893 seconds
3) Running FUN 2 times in 2 thread(s)... 0.813 seconds
CV fold: Fold1
Number of rows of initialization grid > than 'options("mlexperiments.bayesian.max_init")'...
... reducing initialization grid to 10 rows.
Registering parallel backend using 2 cores.
Running initial scoring function 10 times in 2 thread(s)... 4.523 seconds
Starting Epoch 1
1) Fitting Gaussian Process...
2) Running local optimum search... 0.839 seconds
3) Running FUN 2 times in 2 thread(s)... 0.51 seconds
CV fold: Fold2
Number of rows of initialization grid > than 'options("mlexperiments.bayesian.max_init")'...
... reducing initialization grid to 10 rows.
Registering parallel backend using 2 cores.
Running initial scoring function 10 times in 2 thread(s)... 6.457 seconds
Starting Epoch 1
1) Fitting Gaussian Process...
2) Running local optimum search... 0.71 seconds
3) Running FUN 2 times in 2 thread(s)... 0.722 seconds
CV fold: Fold3
Number of rows of initialization grid > than 'options("mlexperiments.bayesian.max_init")'...
... reducing initialization grid to 10 rows.
Registering parallel backend using 2 cores.
Running initial scoring function 10 times in 2 thread(s)... 4.957 seconds
Starting Epoch 1
1) Fitting Gaussian Process...
2) Running local optimum search... 0.911 seconds
3) Running FUN 2 times in 2 thread(s)... 0.562 seconds
CV fold: Fold1
Number of rows of initialization grid > than 'options("mlexperiments.bayesian.max_init")'...
... reducing initialization grid to 10 rows.
Registering parallel backend using 2 cores.
Running initial scoring function 10 times in 2 thread(s)... 6.431 seconds
Starting Epoch 1
1) Fitting Gaussian Process...
2) Running local optimum search... 10.601 seconds
3) Running FUN 2 times in 2 thread(s)... 0.641 seconds
CV fold: Fold2
Number of rows of initialization grid > than 'options("mlexperiments.bayesian.max_init")'...
... reducing initialization grid to 10 rows.
Registering parallel backend using 2 cores.
Running initial scoring function 10 times in 2 thread(s)... 5.659 seconds
Starting Epoch 1
1) Fitting Gaussian Process...
2) Running local optimum search... 11.341 seconds
3) Running FUN 2 times in 2 thread(s)... 0.613 seconds
CV fold: Fold3
Number of rows of initialization grid > than 'options("mlexperiments.bayesian.max_init")'...
... reducing initialization grid to 10 rows.
Registering parallel backend using 2 cores.
Running initial scoring function 10 times in 2 thread(s)... 6.544 seconds
Starting Epoch 1
1) Fitting Gaussian Process...
2) Running local optimum search... 6.119 seconds
3) Running FUN 2 times in 2 thread(s)... 1.085 seconds
CV fold: Fold1
Number of rows of initialization grid > than 'options("mlexperiments.bayesian.max_init")'...
... reducing initialization grid to 10 rows.
Registering parallel backend using 2 cores.
Running initial scoring function 10 times in 2 thread(s)... 4.729 seconds
Starting Epoch 1
1) Fitting Gaussian Process...
- Could not obtain meaningful lengthscales.
2) Running local optimum search...
- Convergence Not Found. Trying again with tighter parameters...
- Convergence Not Found. Trying again with tighter parameters...
- Convergence Not Found. Trying again with tighter parameters...
- Maximum convergence attempts exceeded - process is probably sampling random points. 86.157 seconds
3) Running FUN 2 times in 2 thread(s)... 0.429 seconds
CV fold: Fold2
Number of rows of initialization grid > than 'options("mlexperiments.bayesian.max_init")'...
... reducing initialization grid to 10 rows.
Registering parallel backend using 2 cores.
Running initial scoring function 10 times in 2 thread(s)... 3.828 seconds
Starting Epoch 1
1) Fitting Gaussian Process...
2) Running local optimum search... 7.532 seconds
3) Running FUN 2 times in 2 thread(s)... 0.4 seconds
CV fold: Fold3
Number of rows of initialization grid > than 'options("mlexperiments.bayesian.max_init")'...
... reducing initialization grid to 10 rows.
Registering parallel backend using 2 cores.
Running initial scoring function 10 times in 2 thread(s)... 3.794 seconds
Starting Epoch 1
1) Fitting Gaussian Process...
2) Running local optimum search... 2.162 seconds
3) Running FUN 2 times in 2 thread(s)... 0.712 seconds
[ FAIL 6 | WARN 0 | SKIP 1 | PASS 0 ]
══ Skipped tests (1) ═══════════════════════════════════════════════════════════
• On CRAN (1): 'test-lints.R:10:5'
══ Failed tests ════════════════════════════════════════════════════════════════
── Error ('test-surv_coxph_cox.R:56:5'): test cv - surv_coxph_cox ──────────────
Error: Package "measures" must be installed to use function 'metric_types_helper()'.
Backtrace:
▆
1. └─surv_coxph_cox_optimizer$execute() at test-surv_coxph_cox.R:56:5
2. └─mlexperiments:::.run_cv(self = self, private = private)
3. └─mlexperiments:::.cv_postprocessing(...)
4. └─mlexperiments:::.compute_performance(...)
5. └─base::sapply(...)
6. └─base::lapply(X = X, FUN = FUN, ...)
7. └─mlexperiments (local) FUN(X[[i]], ...)
8. └─mlexperiments::metric_types_helper(...)
── Error ('test-surv_glmnet_cox.R:99:5'): test nested cv, grid - surv_glmnet_cox ──
Error: Package "measures" must be installed to use function 'metric_types_helper()'.
Backtrace:
▆
1. └─surv_glmnet_cox_optimizer$execute() at test-surv_glmnet_cox.R:99:5
2. └─mlexperiments:::.run_cv(self = self, private = private)
3. └─mlexperiments:::.cv_postprocessing(...)
4. └─mlexperiments:::.compute_performance(...)
5. └─base::sapply(...)
6. └─base::lapply(X = X, FUN = FUN, ...)
7. └─mlexperiments (local) FUN(X[[i]], ...)
8. └─mlexperiments::metric_types_helper(...)
── Error ('test-surv_ranger_cox.R:110:5'): test nested cv, bayesian - surv_ranger_cox ──
Error: Package "measures" must be installed to use function 'metric_types_helper()'.
Backtrace:
▆
1. └─surv_ranger_cox_optimizer$execute() at test-surv_ranger_cox.R:110:5
2. └─mlexperiments:::.run_cv(self = self, private = private)
3. └─mlexperiments:::.cv_postprocessing(...)
4. └─mlexperiments:::.compute_performance(...)
5. └─base::sapply(...)
6. └─base::lapply(X = X, FUN = FUN, ...)
7. └─mlexperiments (local) FUN(X[[i]], ...)
8. └─mlexperiments::metric_types_helper(...)
── Error ('test-surv_rpart_cox.R:108:5'): test nested cv, bayesian - surv_rpart_cox ──
Error: Package "measures" must be installed to use function 'metric_types_helper()'.
Backtrace:
▆
1. └─surv_rpart_cox_optimizer$execute() at test-surv_rpart_cox.R:108:5
2. └─mlexperiments:::.run_cv(self = self, private = private)
3. └─mlexperiments:::.cv_postprocessing(...)
4. └─mlexperiments:::.compute_performance(...)
5. └─base::sapply(...)
6. └─base::lapply(X = X, FUN = FUN, ...)
7. └─mlexperiments (local) FUN(X[[i]], ...)
8. └─mlexperiments::metric_types_helper(...)
── Error ('test-surv_xgboost_aft.R:116:5'): test nested cv, bayesian - surv_xgboost_aft ──
Error: Package "measures" must be installed to use function 'metric_types_helper()'.
Backtrace:
▆
1. └─surv_xgboost_aft_optimizer$execute() at test-surv_xgboost_aft.R:116:5
2. └─mlexperiments:::.run_cv(self = self, private = private)
3. └─mlexperiments:::.cv_postprocessing(...)
4. └─mlexperiments:::.compute_performance(...)
5. └─base::sapply(...)
6. └─base::lapply(X = X, FUN = FUN, ...)
7. └─mlexperiments (local) FUN(X[[i]], ...)
8. └─mlexperiments::metric_types_helper(...)
── Error ('test-surv_xgboost_cox.R:115:5'): test nested cv, bayesian - surv_xgboost_cox ──
Error: Package "measures" must be installed to use function 'metric_types_helper()'.
Backtrace:
▆
1. └─surv_xgboost_cox_optimizer$execute() at test-surv_xgboost_cox.R:115:5
2. └─mlexperiments:::.run_cv(self = self, private = private)
3. └─mlexperiments:::.cv_postprocessing(...)
4. └─mlexperiments:::.compute_performance(...)
5. └─base::sapply(...)
6. └─base::lapply(X = X, FUN = FUN, ...)
7. └─mlexperiments (local) FUN(X[[i]], ...)
8. └─mlexperiments::metric_types_helper(...)
[ FAIL 6 | WARN 0 | SKIP 1 | PASS 0 ]
Error: Test failures
Execution halted
Flavor: r-devel-linux-x86_64-debian-gcc
Version: 0.0.5
Check: examples
Result: ERROR
Running examples in ‘mlsurvlrnrs-Ex.R’ failed
The error most likely occurred in:
> ### Name: LearnerSurvCoxPHCox
> ### Title: R6 Class to construct a Cox proportional hazards survival
> ### learner
> ### Aliases: LearnerSurvCoxPHCox
>
> ### ** Examples
>
> # survival analysis
>
> dataset <- survival::colon |>
+ data.table::as.data.table() |>
+ na.omit()
> dataset <- dataset[get("etype") == 2, ]
>
> seed <- 123
> surv_cols <- c("status", "time", "rx")
>
> feature_cols <- colnames(dataset)[3:(ncol(dataset) - 1)]
>
> split_vector <- splitTools::multi_strata(
+ df = dataset[, .SD, .SDcols = surv_cols],
+ strategy = "kmeans",
+ k = 4
+ )
>
> train_x <- model.matrix(
+ ~ -1 + .,
+ dataset[, .SD, .SDcols = setdiff(feature_cols, surv_cols[1:2])]
+ )
> train_y <- survival::Surv(
+ event = (dataset[, get("status")] |>
+ as.character() |>
+ as.integer()),
+ time = dataset[, get("time")],
+ type = "right"
+ )
>
> fold_list <- splitTools::create_folds(
+ y = split_vector,
+ k = 3,
+ type = "stratified",
+ seed = seed
+ )
>
>
> surv_coxph_cox_optimizer <- mlexperiments::MLCrossValidation$new(
+ learner = LearnerSurvCoxPHCox$new(),
+ fold_list = fold_list,
+ ncores = 1L,
+ seed = seed
+ )
> surv_coxph_cox_optimizer$performance_metric <- c_index
>
> # set data
> surv_coxph_cox_optimizer$set_data(
+ x = train_x,
+ y = train_y
+ )
>
> surv_coxph_cox_optimizer$execute()
CV fold: Fold1
Parameter 'ncores' is ignored for learner 'LearnerSurvCoxPHCox'.
CV fold: Fold2
Parameter 'ncores' is ignored for learner 'LearnerSurvCoxPHCox'.
CV fold: Fold3
Parameter 'ncores' is ignored for learner 'LearnerSurvCoxPHCox'.
Error: Package "measures" must be installed to use function 'metric_types_helper()'.
Execution halted
Flavor: r-devel-linux-x86_64-fedora-clang
Version: 0.0.5
Check: tests
Result: ERROR
Running ‘testthat.R’ [2m/46m]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
> # This file is part of the standard setup for testthat.
> # It is recommended that you do not modify it.
> #
> # Where should you do additional test configuration?
> # Learn more about the roles of various files in:
> # * https://r-pkgs.org/tests.html
> # * https://testthat.r-lib.org/reference/test_package.html#special-files
>
> Sys.setenv("OMP_THREAD_LIMIT" = 2)
> Sys.setenv("Ncpu" = 2)
>
> library(testthat)
> library(mlsurvlrnrs)
>
> test_check("mlsurvlrnrs")
CV fold: Fold1
Parameter 'ncores' is ignored for learner 'LearnerSurvCoxPHCox'.
CV fold: Fold2
Parameter 'ncores' is ignored for learner 'LearnerSurvCoxPHCox'.
CV fold: Fold3
Parameter 'ncores' is ignored for learner 'LearnerSurvCoxPHCox'.
CV fold: Fold1
Registering parallel backend using 2 cores.
Running initial scoring function 6 times in 2 thread(s)... 46.09 seconds
Starting Epoch 1
1) Fitting Gaussian Process...
2) Running local optimum search... 16.202 seconds
3) Running FUN 2 times in 2 thread(s)... 7.73 seconds
CV fold: Fold2
Registering parallel backend using 2 cores.
Running initial scoring function 6 times in 2 thread(s)... 73.288 seconds
Starting Epoch 1
1) Fitting Gaussian Process...
2) Running local optimum search... 15.895 seconds
3) Running FUN 2 times in 2 thread(s)... 5.094 seconds
CV fold: Fold3
Registering parallel backend using 2 cores.
Running initial scoring function 6 times in 2 thread(s)... 38.916 seconds
Starting Epoch 1
1) Fitting Gaussian Process...
2) Running local optimum search... 7.693 seconds
3) Running FUN 2 times in 2 thread(s)... 16.055 seconds
CV fold: Fold1
Number of rows of initialization grid > than 'options("mlexperiments.bayesian.max_init")'...
... reducing initialization grid to 10 rows.
Registering parallel backend using 2 cores.
Running initial scoring function 10 times in 2 thread(s)... 57.507 seconds
Starting Epoch 1
1) Fitting Gaussian Process...
- Could not obtain meaningful lengthscales.
2) Running local optimum search...
- Convergence Not Found. Trying again with tighter parameters...
- Convergence Not Found. Trying again with tighter parameters...
- Convergence Not Found. Trying again with tighter parameters...
- Maximum convergence attempts exceeded - process is probably sampling random points. 704.096 seconds
3) Running FUN 2 times in 2 thread(s)... 7.571 seconds
CV fold: Fold2
Number of rows of initialization grid > than 'options("mlexperiments.bayesian.max_init")'...
... reducing initialization grid to 10 rows.
Registering parallel backend using 2 cores.
Running initial scoring function 10 times in 2 thread(s)... 49.912 seconds
Starting Epoch 1
1) Fitting Gaussian Process...
2) Running local optimum search... 267.825 seconds
3) Running FUN 2 times in 2 thread(s)... 3.79 seconds
CV fold: Fold3
Number of rows of initialization grid > than 'options("mlexperiments.bayesian.max_init")'...
... reducing initialization grid to 10 rows.
Registering parallel backend using 2 cores.
Running initial scoring function 10 times in 2 thread(s)... 38.892 seconds
Starting Epoch 1
1) Fitting Gaussian Process...
2) Running local optimum search... 38.319 seconds
3) Running FUN 2 times in 2 thread(s)... 5.735 seconds
CV fold: Fold1
Number of rows of initialization grid > than 'options("mlexperiments.bayesian.max_init")'...
... reducing initialization grid to 10 rows.
Registering parallel backend using 2 cores.
Running initial scoring function 10 times in 2 thread(s)... 52.099 seconds
Starting Epoch 1
1) Fitting Gaussian Process...
2) Running local optimum search... 6.208 seconds
3) Running FUN 2 times in 2 thread(s)... 2.896 seconds
CV fold: Fold2
Number of rows of initialization grid > than 'options("mlexperiments.bayesian.max_init")'...
... reducing initialization grid to 10 rows.
Registering parallel backend using 2 cores.
Running initial scoring function 10 times in 2 thread(s)... 60.502 seconds
Starting Epoch 1
1) Fitting Gaussian Process...
2) Running local optimum search... 8.243 seconds
3) Running FUN 2 times in 2 thread(s)... 5.359 seconds
CV fold: Fold3
Number of rows of initialization grid > than 'options("mlexperiments.bayesian.max_init")'...
... reducing initialization grid to 10 rows.
Registering parallel backend using 2 cores.
Running initial scoring function 10 times in 2 thread(s)... 63.472 seconds
Starting Epoch 1
1) Fitting Gaussian Process...
2) Running local optimum search... 9.439 seconds
3) Running FUN 2 times in 2 thread(s)... 4.052 seconds
CV fold: Fold1
Number of rows of initialization grid > than 'options("mlexperiments.bayesian.max_init")'...
... reducing initialization grid to 10 rows.
Registering parallel backend using 2 cores.
Running initial scoring function 10 times in 2 thread(s)... 60.45 seconds
Starting Epoch 1
1) Fitting Gaussian Process...
2) Running local optimum search... 140.685 seconds
3) Running FUN 2 times in 2 thread(s)... 4.043 seconds
CV fold: Fold2
Number of rows of initialization grid > than 'options("mlexperiments.bayesian.max_init")'...
... reducing initialization grid to 10 rows.
Registering parallel backend using 2 cores.
Running initial scoring function 10 times in 2 thread(s)... 55.389 seconds
Starting Epoch 1
1) Fitting Gaussian Process...
2) Running local optimum search... 43.095 seconds
3) Running FUN 2 times in 2 thread(s)... 8.372 seconds
CV fold: Fold3
Number of rows of initialization grid > than 'options("mlexperiments.bayesian.max_init")'...
... reducing initialization grid to 10 rows.
Registering parallel backend using 2 cores.
Running initial scoring function 10 times in 2 thread(s)... 52.599 seconds
Starting Epoch 1
1) Fitting Gaussian Process...
2) Running local optimum search... 81.76 seconds
3) Running FUN 2 times in 2 thread(s)... 3.346 seconds
CV fold: Fold1
Number of rows of initialization grid > than 'options("mlexperiments.bayesian.max_init")'...
... reducing initialization grid to 10 rows.
Registering parallel backend using 2 cores.
Running initial scoring function 10 times in 2 thread(s)... 42.569 seconds
Starting Epoch 1
1) Fitting Gaussian Process...
2) Running local optimum search... 41.228 seconds
3) Running FUN 2 times in 2 thread(s)... 3.366 seconds
CV fold: Fold2
Number of rows of initialization grid > than 'options("mlexperiments.bayesian.max_init")'...
... reducing initialization grid to 10 rows.
Registering parallel backend using 2 cores.
Running initial scoring function 10 times in 2 thread(s)... 41.494 seconds
Starting Epoch 1
1) Fitting Gaussian Process...
- Could not obtain meaningful lengthscales.
2) Running local optimum search...
- Convergence Not Found. Trying again with tighter parameters...
- Convergence Not Found. Trying again with tighter parameters... 84.82 seconds
3) Running FUN 2 times in 2 thread(s)... 4.257 seconds
CV fold: Fold3
Number of rows of initialization grid > than 'options("mlexperiments.bayesian.max_init")'...
... reducing initialization grid to 10 rows.
Registering parallel backend using 2 cores.
Running initial scoring function 10 times in 2 thread(s)... 39.031 seconds
Starting Epoch 1
1) Fitting Gaussian Process...
2) Running local optimum search... 49.178 seconds
3) Running FUN 2 times in 2 thread(s)... 2.423 seconds
[ FAIL 6 | WARN 0 | SKIP 1 | PASS 0 ]
══ Skipped tests (1) ═══════════════════════════════════════════════════════════
• On CRAN (1): 'test-lints.R:10:5'
══ Failed tests ════════════════════════════════════════════════════════════════
── Error ('test-surv_coxph_cox.R:56:5'): test cv - surv_coxph_cox ──────────────
Error: Package "measures" must be installed to use function 'metric_types_helper()'.
Backtrace:
▆
1. └─surv_coxph_cox_optimizer$execute() at test-surv_coxph_cox.R:56:5
2. └─mlexperiments:::.run_cv(self = self, private = private)
3. └─mlexperiments:::.cv_postprocessing(...)
4. └─mlexperiments:::.compute_performance(...)
5. └─base::sapply(...)
6. └─base::lapply(X = X, FUN = FUN, ...)
7. └─mlexperiments (local) FUN(X[[i]], ...)
8. └─mlexperiments::metric_types_helper(...)
── Error ('test-surv_glmnet_cox.R:99:5'): test nested cv, grid - surv_glmnet_cox ──
Error: Package "measures" must be installed to use function 'metric_types_helper()'.
Backtrace:
▆
1. └─surv_glmnet_cox_optimizer$execute() at test-surv_glmnet_cox.R:99:5
2. └─mlexperiments:::.run_cv(self = self, private = private)
3. └─mlexperiments:::.cv_postprocessing(...)
4. └─mlexperiments:::.compute_performance(...)
5. └─base::sapply(...)
6. └─base::lapply(X = X, FUN = FUN, ...)
7. └─mlexperiments (local) FUN(X[[i]], ...)
8. └─mlexperiments::metric_types_helper(...)
── Error ('test-surv_ranger_cox.R:110:5'): test nested cv, bayesian - surv_ranger_cox ──
Error: Package "measures" must be installed to use function 'metric_types_helper()'.
Backtrace:
▆
1. └─surv_ranger_cox_optimizer$execute() at test-surv_ranger_cox.R:110:5
2. └─mlexperiments:::.run_cv(self = self, private = private)
3. └─mlexperiments:::.cv_postprocessing(...)
4. └─mlexperiments:::.compute_performance(...)
5. └─base::sapply(...)
6. └─base::lapply(X = X, FUN = FUN, ...)
7. └─mlexperiments (local) FUN(X[[i]], ...)
8. └─mlexperiments::metric_types_helper(...)
── Error ('test-surv_rpart_cox.R:108:5'): test nested cv, bayesian - surv_rpart_cox ──
Error: Package "measures" must be installed to use function 'metric_types_helper()'.
Backtrace:
▆
1. └─surv_rpart_cox_optimizer$execute() at test-surv_rpart_cox.R:108:5
2. └─mlexperiments:::.run_cv(self = self, private = private)
3. └─mlexperiments:::.cv_postprocessing(...)
4. └─mlexperiments:::.compute_performance(...)
5. └─base::sapply(...)
6. └─base::lapply(X = X, FUN = FUN, ...)
7. └─mlexperiments (local) FUN(X[[i]], ...)
8. └─mlexperiments::metric_types_helper(...)
── Error ('test-surv_xgboost_aft.R:116:5'): test nested cv, bayesian - surv_xgboost_aft ──
Error: Package "measures" must be installed to use function 'metric_types_helper()'.
Backtrace:
▆
1. └─surv_xgboost_aft_optimizer$execute() at test-surv_xgboost_aft.R:116:5
2. └─mlexperiments:::.run_cv(self = self, private = private)
3. └─mlexperiments:::.cv_postprocessing(...)
4. └─mlexperiments:::.compute_performance(...)
5. └─base::sapply(...)
6. └─base::lapply(X = X, FUN = FUN, ...)
7. └─mlexperiments (local) FUN(X[[i]], ...)
8. └─mlexperiments::metric_types_helper(...)
── Error ('test-surv_xgboost_cox.R:115:5'): test nested cv, bayesian - surv_xgboost_cox ──
Error: Package "measures" must be installed to use function 'metric_types_helper()'.
Backtrace:
▆
1. └─surv_xgboost_cox_optimizer$execute() at test-surv_xgboost_cox.R:115:5
2. └─mlexperiments:::.run_cv(self = self, private = private)
3. └─mlexperiments:::.cv_postprocessing(...)
4. └─mlexperiments:::.compute_performance(...)
5. └─base::sapply(...)
6. └─base::lapply(X = X, FUN = FUN, ...)
7. └─mlexperiments (local) FUN(X[[i]], ...)
8. └─mlexperiments::metric_types_helper(...)
[ FAIL 6 | WARN 0 | SKIP 1 | PASS 0 ]
Error: Test failures
Execution halted
Flavor: r-devel-linux-x86_64-fedora-clang
Version: 0.0.5
Check: examples
Result: ERROR
Running examples in ‘mlsurvlrnrs-Ex.R’ failed
The error most likely occurred in:
> ### Name: LearnerSurvCoxPHCox
> ### Title: R6 Class to construct a Cox proportional hazards survival
> ### learner
> ### Aliases: LearnerSurvCoxPHCox
>
> ### ** Examples
>
> # survival analysis
>
> dataset <- survival::colon |>
+ data.table::as.data.table() |>
+ na.omit()
> dataset <- dataset[get("etype") == 2, ]
>
> seed <- 123
> surv_cols <- c("status", "time", "rx")
>
> feature_cols <- colnames(dataset)[3:(ncol(dataset) - 1)]
>
> split_vector <- splitTools::multi_strata(
+ df = dataset[, .SD, .SDcols = surv_cols],
+ strategy = "kmeans",
+ k = 4
+ )
>
> train_x <- model.matrix(
+ ~ -1 + .,
+ dataset[, .SD, .SDcols = setdiff(feature_cols, surv_cols[1:2])]
+ )
> train_y <- survival::Surv(
+ event = (dataset[, get("status")] |>
+ as.character() |>
+ as.integer()),
+ time = dataset[, get("time")],
+ type = "right"
+ )
>
> fold_list <- splitTools::create_folds(
+ y = split_vector,
+ k = 3,
+ type = "stratified",
+ seed = seed
+ )
>
>
> surv_coxph_cox_optimizer <- mlexperiments::MLCrossValidation$new(
+ learner = LearnerSurvCoxPHCox$new(),
+ fold_list = fold_list,
+ ncores = 1L,
+ seed = seed
+ )
> surv_coxph_cox_optimizer$performance_metric <- c_index
>
> # set data
> surv_coxph_cox_optimizer$set_data(
+ x = train_x,
+ y = train_y
+ )
>
> surv_coxph_cox_optimizer$execute()
CV fold: Fold1
Parameter 'ncores' is ignored for learner 'LearnerSurvCoxPHCox'.
CV fold: Fold2
Parameter 'ncores' is ignored for learner 'LearnerSurvCoxPHCox'.
CV fold: Fold3
Parameter 'ncores' is ignored for learner 'LearnerSurvCoxPHCox'.
Error in if (fun_name == "PPV") { : argument is of length zero
Calls: <Anonymous> ... .compute_performance -> sapply -> lapply -> FUN -> metric_types_helper
Execution halted
Flavor: r-devel-linux-x86_64-fedora-gcc
Version: 0.0.5
Check: tests
Result: ERROR
Running ‘testthat.R’ [4m/24m]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
> # This file is part of the standard setup for testthat.
> # It is recommended that you do not modify it.
> #
> # Where should you do additional test configuration?
> # Learn more about the roles of various files in:
> # * https://r-pkgs.org/tests.html
> # * https://testthat.r-lib.org/reference/test_package.html#special-files
>
> Sys.setenv("OMP_THREAD_LIMIT" = 2)
> Sys.setenv("Ncpu" = 2)
>
> library(testthat)
> library(mlsurvlrnrs)
>
> test_check("mlsurvlrnrs")
CV fold: Fold1
Parameter 'ncores' is ignored for learner 'LearnerSurvCoxPHCox'.
CV fold: Fold2
Parameter 'ncores' is ignored for learner 'LearnerSurvCoxPHCox'.
CV fold: Fold3
Parameter 'ncores' is ignored for learner 'LearnerSurvCoxPHCox'.
CV fold: Fold1
Registering parallel backend using 2 cores.
Running initial scoring function 6 times in 2 thread(s)... 25.218 seconds
Starting Epoch 1
1) Fitting Gaussian Process...
2) Running local optimum search... 6.299 seconds
3) Running FUN 2 times in 2 thread(s)... 3.381 seconds
CV fold: Fold2
Registering parallel backend using 2 cores.
Running initial scoring function 6 times in 2 thread(s)... 29.124 seconds
Starting Epoch 1
1) Fitting Gaussian Process...
2) Running local optimum search... 6.087 seconds
3) Running FUN 2 times in 2 thread(s)... 3.769 seconds
CV fold: Fold3
Registering parallel backend using 2 cores.
Running initial scoring function 6 times in 2 thread(s)... 23.974 seconds
Starting Epoch 1
1) Fitting Gaussian Process...
2) Running local optimum search... 2.869 seconds
3) Running FUN 2 times in 2 thread(s)... 3.986 seconds
CV fold: Fold1
Number of rows of initialization grid > than 'options("mlexperiments.bayesian.max_init")'...
... reducing initialization grid to 10 rows.
Registering parallel backend using 2 cores.
Running initial scoring function 10 times in 2 thread(s)... 22.342 seconds
Starting Epoch 1
1) Fitting Gaussian Process...
- Could not obtain meaningful lengthscales.
2) Running local optimum search...
- Convergence Not Found. Trying again with tighter parameters...
- Convergence Not Found. Trying again with tighter parameters... 37.406 seconds
3) Running FUN 2 times in 2 thread(s)... 2.7 seconds
CV fold: Fold2
Number of rows of initialization grid > than 'options("mlexperiments.bayesian.max_init")'...
... reducing initialization grid to 10 rows.
Registering parallel backend using 2 cores.
Running initial scoring function 10 times in 2 thread(s)... 23.778 seconds
Starting Epoch 1
1) Fitting Gaussian Process...
2) Running local optimum search... 88.566 seconds
3) Running FUN 2 times in 2 thread(s)... 1.06 seconds
CV fold: Fold3
Number of rows of initialization grid > than 'options("mlexperiments.bayesian.max_init")'...
... reducing initialization grid to 10 rows.
Registering parallel backend using 2 cores.
Running initial scoring function 10 times in 2 thread(s)... 20.903 seconds
Starting Epoch 1
1) Fitting Gaussian Process...
- Could not obtain meaningful lengthscales.
2) Running local optimum search... 3.98 seconds
3) Running FUN 2 times in 2 thread(s)... 1.651 seconds
CV fold: Fold1
Number of rows of initialization grid > than 'options("mlexperiments.bayesian.max_init")'...
... reducing initialization grid to 10 rows.
Registering parallel backend using 2 cores.
Running initial scoring function 10 times in 2 thread(s)... 18.372 seconds
Starting Epoch 1
1) Fitting Gaussian Process...
2) Running local optimum search... 1.63 seconds
3) Running FUN 2 times in 2 thread(s)... 1.143 seconds
CV fold: Fold2
Number of rows of initialization grid > than 'options("mlexperiments.bayesian.max_init")'...
... reducing initialization grid to 10 rows.
Registering parallel backend using 2 cores.
Running initial scoring function 10 times in 2 thread(s)... 23.218 seconds
Starting Epoch 1
1) Fitting Gaussian Process...
2) Running local optimum search... 3.465 seconds
3) Running FUN 2 times in 2 thread(s)... 2.314 seconds
CV fold: Fold3
Number of rows of initialization grid > than 'options("mlexperiments.bayesian.max_init")'...
... reducing initialization grid to 10 rows.
Registering parallel backend using 2 cores.
Running initial scoring function 10 times in 2 thread(s)... 20.494 seconds
Starting Epoch 1
1) Fitting Gaussian Process...
2) Running local optimum search... 2.132 seconds
3) Running FUN 2 times in 2 thread(s)... 1.254 seconds
CV fold: Fold1
Number of rows of initialization grid > than 'options("mlexperiments.bayesian.max_init")'...
... reducing initialization grid to 10 rows.
Registering parallel backend using 2 cores.
Running initial scoring function 10 times in 2 thread(s)... 23.63 seconds
Starting Epoch 1
1) Fitting Gaussian Process...
2) Running local optimum search... 71.942 seconds
3) Running FUN 2 times in 2 thread(s)... 1.643 seconds
CV fold: Fold2
Number of rows of initialization grid > than 'options("mlexperiments.bayesian.max_init")'...
... reducing initialization grid to 10 rows.
Registering parallel backend using 2 cores.
Running initial scoring function 10 times in 2 thread(s)... 19.804 seconds
Starting Epoch 1
1) Fitting Gaussian Process...
2) Running local optimum search... 61.991 seconds
3) Running FUN 2 times in 2 thread(s)... 2.427 seconds
CV fold: Fold3
Number of rows of initialization grid > than 'options("mlexperiments.bayesian.max_init")'...
... reducing initialization grid to 10 rows.
Registering parallel backend using 2 cores.
Running initial scoring function 10 times in 2 thread(s)... 23.17 seconds
Starting Epoch 1
1) Fitting Gaussian Process...
2) Running local optimum search... 37.123 seconds
3) Running FUN 2 times in 2 thread(s)... 1.809 seconds
CV fold: Fold1
Number of rows of initialization grid > than 'options("mlexperiments.bayesian.max_init")'...
... reducing initialization grid to 10 rows.
Registering parallel backend using 2 cores.
Running initial scoring function 10 times in 2 thread(s)... 19.332 seconds
Starting Epoch 1
1) Fitting Gaussian Process...
- Could not obtain meaningful lengthscales.
2) Running local optimum search...
- Convergence Not Found. Trying again with tighter parameters...
- Convergence Not Found. Trying again with tighter parameters...
- Convergence Not Found. Trying again with tighter parameters...
- Maximum convergence attempts exceeded - process is probably sampling random points. 379.066 seconds
3) Running FUN 2 times in 2 thread(s)... 1.217 seconds
CV fold: Fold2
Number of rows of initialization grid > than 'options("mlexperiments.bayesian.max_init")'...
... reducing initialization grid to 10 rows.
Registering parallel backend using 2 cores.
Running initial scoring function 10 times in 2 thread(s)... 18.742 seconds
Starting Epoch 1
1) Fitting Gaussian Process...
2) Running local optimum search... 53.785 seconds
3) Running FUN 2 times in 2 thread(s)... 0.871 seconds
CV fold: Fold3
Number of rows of initialization grid > than 'options("mlexperiments.bayesian.max_init")'...
... reducing initialization grid to 10 rows.
Registering parallel backend using 2 cores.
Running initial scoring function 10 times in 2 thread(s)... 16.34 seconds
Starting Epoch 1
1) Fitting Gaussian Process...
2) Running local optimum search... 10.621 seconds
3) Running FUN 2 times in 2 thread(s)... 2 seconds
[ FAIL 6 | WARN 0 | SKIP 1 | PASS 0 ]
══ Skipped tests (1) ═══════════════════════════════════════════════════════════
• On CRAN (1): 'test-lints.R:10:5'
══ Failed tests ════════════════════════════════════════════════════════════════
── Error ('test-surv_coxph_cox.R:56:5'): test cv - surv_coxph_cox ──────────────
Error in `if (fun_name == "PPV") {
metric_metadata$probabilities <- FALSE
}`: argument is of length zero
Backtrace:
▆
1. └─surv_coxph_cox_optimizer$execute() at test-surv_coxph_cox.R:56:5
2. └─mlexperiments:::.run_cv(self = self, private = private)
3. └─mlexperiments:::.cv_postprocessing(...)
4. └─mlexperiments:::.compute_performance(...)
5. └─base::sapply(...)
6. └─base::lapply(X = X, FUN = FUN, ...)
7. └─mlexperiments (local) FUN(X[[i]], ...)
8. └─mlexperiments::metric_types_helper(...)
── Error ('test-surv_glmnet_cox.R:99:5'): test nested cv, grid - surv_glmnet_cox ──
Error in `if (fun_name == "PPV") {
metric_metadata$probabilities <- FALSE
}`: argument is of length zero
Backtrace:
▆
1. └─surv_glmnet_cox_optimizer$execute() at test-surv_glmnet_cox.R:99:5
2. └─mlexperiments:::.run_cv(self = self, private = private)
3. └─mlexperiments:::.cv_postprocessing(...)
4. └─mlexperiments:::.compute_performance(...)
5. └─base::sapply(...)
6. └─base::lapply(X = X, FUN = FUN, ...)
7. └─mlexperiments (local) FUN(X[[i]], ...)
8. └─mlexperiments::metric_types_helper(...)
── Error ('test-surv_ranger_cox.R:110:5'): test nested cv, bayesian - surv_ranger_cox ──
Error in `if (fun_name == "PPV") {
metric_metadata$probabilities <- FALSE
}`: argument is of length zero
Backtrace:
▆
1. └─surv_ranger_cox_optimizer$execute() at test-surv_ranger_cox.R:110:5
2. └─mlexperiments:::.run_cv(self = self, private = private)
3. └─mlexperiments:::.cv_postprocessing(...)
4. └─mlexperiments:::.compute_performance(...)
5. └─base::sapply(...)
6. └─base::lapply(X = X, FUN = FUN, ...)
7. └─mlexperiments (local) FUN(X[[i]], ...)
8. └─mlexperiments::metric_types_helper(...)
── Error ('test-surv_rpart_cox.R:108:5'): test nested cv, bayesian - surv_rpart_cox ──
Error in `if (fun_name == "PPV") {
metric_metadata$probabilities <- FALSE
}`: argument is of length zero
Backtrace:
▆
1. └─surv_rpart_cox_optimizer$execute() at test-surv_rpart_cox.R:108:5
2. └─mlexperiments:::.run_cv(self = self, private = private)
3. └─mlexperiments:::.cv_postprocessing(...)
4. └─mlexperiments:::.compute_performance(...)
5. └─base::sapply(...)
6. └─base::lapply(X = X, FUN = FUN, ...)
7. └─mlexperiments (local) FUN(X[[i]], ...)
8. └─mlexperiments::metric_types_helper(...)
── Error ('test-surv_xgboost_aft.R:116:5'): test nested cv, bayesian - surv_xgboost_aft ──
Error in `if (fun_name == "PPV") {
metric_metadata$probabilities <- FALSE
}`: argument is of length zero
Backtrace:
▆
1. └─surv_xgboost_aft_optimizer$execute() at test-surv_xgboost_aft.R:116:5
2. └─mlexperiments:::.run_cv(self = self, private = private)
3. └─mlexperiments:::.cv_postprocessing(...)
4. └─mlexperiments:::.compute_performance(...)
5. └─base::sapply(...)
6. └─base::lapply(X = X, FUN = FUN, ...)
7. └─mlexperiments (local) FUN(X[[i]], ...)
8. └─mlexperiments::metric_types_helper(...)
── Error ('test-surv_xgboost_cox.R:115:5'): test nested cv, bayesian - surv_xgboost_cox ──
Error in `if (fun_name == "PPV") {
metric_metadata$probabilities <- FALSE
}`: argument is of length zero
Backtrace:
▆
1. └─surv_xgboost_cox_optimizer$execute() at test-surv_xgboost_cox.R:115:5
2. └─mlexperiments:::.run_cv(self = self, private = private)
3. └─mlexperiments:::.cv_postprocessing(...)
4. └─mlexperiments:::.compute_performance(...)
5. └─base::sapply(...)
6. └─base::lapply(X = X, FUN = FUN, ...)
7. └─mlexperiments (local) FUN(X[[i]], ...)
8. └─mlexperiments::metric_types_helper(...)
[ FAIL 6 | WARN 0 | SKIP 1 | PASS 0 ]
Error: Test failures
Execution halted
Flavor: r-devel-linux-x86_64-fedora-gcc