- using R Under development (unstable) (2025-12-19 r89206)
- using platform: x86_64-pc-linux-gnu
- R was compiled by
gcc-15 (Debian 15.2.0-11) 15.2.0
GNU Fortran (Debian 15.2.0-11) 15.2.0
- running under: Debian GNU/Linux forky/sid
- using session charset: UTF-8
- checking for file ‘mlexperiments/DESCRIPTION’ ... OK
- this is package ‘mlexperiments’ version ‘0.0.8’
- package encoding: UTF-8
- checking CRAN incoming feasibility ... [1s/1s] OK
- checking package namespace information ... OK
- checking package dependencies ... OK
- checking if this is a source package ... OK
- checking if there is a namespace ... OK
- checking for executable files ... OK
- checking for hidden files and directories ... OK
- checking for portable file names ... OK
- checking for sufficient/correct file permissions ... OK
- checking whether package ‘mlexperiments’ can be installed ... OK
See the install log for details.
- checking package directory ... OK
- checking for future file timestamps ... OK
- checking ‘build’ directory ... OK
- checking DESCRIPTION meta-information ... OK
- checking top-level files ... OK
- checking for left-over files ... OK
- checking index information ... OK
- checking package subdirectories ... OK
- checking code files for non-ASCII characters ... OK
- checking R files for syntax errors ... OK
- checking whether the package can be loaded ... [0s/0s] OK
- checking whether the package can be loaded with stated dependencies ... [0s/0s] OK
- checking whether the package can be unloaded cleanly ... [0s/0s] OK
- checking whether the namespace can be loaded with stated dependencies ... [0s/0s] OK
- checking whether the namespace can be unloaded cleanly ... [0s/0s] OK
- checking loading without being on the library search path ... [0s/1s] OK
- checking whether startup messages can be suppressed ... [0s/0s] OK
- checking use of S3 registration ... OK
- checking dependencies in R code ... OK
- checking S3 generic/method consistency ... OK
- checking replacement functions ... OK
- checking foreign function calls ... OK
- checking R code for possible problems ... [5s/7s] OK
- checking Rd files ... [0s/1s] OK
- checking Rd metadata ... OK
- checking Rd line widths ... OK
- checking Rd cross-references ... OK
- checking for missing documentation entries ... OK
- checking for code/documentation mismatches ... OK
- checking Rd \usage sections ... OK
- checking Rd contents ... OK
- checking for unstated dependencies in examples ... OK
- checking installed files from ‘inst/doc’ ... OK
- checking files in ‘vignettes’ ... OK
- checking examples ... [2s/4s] ERROR
Running examples in ‘mlexperiments-Ex.R’ failed
The error most likely occurred in:
> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: performance
> ### Title: performance
> ### Aliases: performance
>
> ### ** Examples
>
> dataset <- do.call(
+ cbind,
+ c(sapply(paste0("col", 1:6), function(x) {
+ rnorm(n = 500)
+ },
+ USE.NAMES = TRUE,
+ simplify = FALSE
+ ),
+ list(target = sample(0:1, 500, TRUE))
+ ))
>
> fold_list <- splitTools::create_folds(
+ y = dataset[, 7],
+ k = 3,
+ type = "stratified",
+ seed = 123
+ )
>
> glm_optimization <- mlexperiments::MLCrossValidation$new(
+ learner = LearnerGlm$new(),
+ fold_list = fold_list,
+ seed = 123
+ )
>
> glm_optimization$learner_args <- list(family = binomial(link = "logit"))
> glm_optimization$predict_args <- list(type = "response")
> glm_optimization$performance_metric_args <- list(
+ positive = "1",
+ negative = "0"
+ )
> glm_optimization$performance_metric <- list(
+ auc = metric("AUC"), sensitivity = metric("TPR"),
+ specificity = metric("TNR")
+ )
> glm_optimization$return_models <- TRUE
>
> # set data
> glm_optimization$set_data(
+ x = data.matrix(dataset[, -7]),
+ y = dataset[, 7]
+ )
>
> cv_results <- glm_optimization$execute()
CV fold: Fold1
Parameter 'ncores' is ignored for learner 'LearnerGlm'.
CV fold: Fold2
Parameter 'ncores' is ignored for learner 'LearnerGlm'.
CV fold: Fold3
Parameter 'ncores' is ignored for learner 'LearnerGlm'.
>
> # predictions
> preds <- mlexperiments::predictions(
+ object = glm_optimization,
+ newdata = data.matrix(dataset[, -7]),
+ na.rm = FALSE,
+ ncores = 2L,
+ type = "response"
+ )
Error in `[.data.table`(res, , `:=`(mean = mean(as.numeric(.SD), na.rm = na.rm), :
attempt access index 3/3 in VECTOR_ELT
Calls: <Anonymous> -> [ -> [.data.table
Execution halted
- checking for unstated dependencies in ‘tests’ ... OK
- checking tests ... [137s/352s] ERROR
Running ‘testthat.R’ [137s/352s]
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(mlexperiments)
>
> test_check("mlexperiments")
CV fold: Fold1
Parameter 'ncores' is ignored for learner 'LearnerGlm'.
CV fold: Fold2
Parameter 'ncores' is ignored for learner 'LearnerGlm'.
CV fold: Fold3
Parameter 'ncores' is ignored for learner 'LearnerGlm'.
CV fold: Fold4
Parameter 'ncores' is ignored for learner 'LearnerGlm'.
CV fold: Fold5
Parameter 'ncores' is ignored for learner 'LearnerGlm'.
CV fold: Fold1
CV fold: Fold2
CV fold: Fold3
CV fold: Fold4
CV fold: Fold5
Testing for identical folds in 2 and 1.
CV fold: Fold1
Parameter 'ncores' is ignored for learner 'LearnerGlm'.
CV fold: Fold2
Parameter 'ncores' is ignored for learner 'LearnerGlm'.
CV fold: Fold3
Parameter 'ncores' is ignored for learner 'LearnerGlm'.
CV fold: Fold4
Parameter 'ncores' is ignored for learner 'LearnerGlm'.
CV fold: Fold5
Parameter 'ncores' is ignored for learner 'LearnerGlm'.
CV fold: Fold1
Parameter 'ncores' is ignored for learner 'LearnerGlm'.
CV fold: Fold2
Parameter 'ncores' is ignored for learner 'LearnerGlm'.
CV fold: Fold3
Parameter 'ncores' is ignored for learner 'LearnerGlm'.
CV fold: Fold4
Parameter 'ncores' is ignored for learner 'LearnerGlm'.
CV fold: Fold5
Parameter 'ncores' is ignored for learner 'LearnerGlm'.
CV fold: Fold1
Parameter 'ncores' is ignored for learner 'LearnerGlm'.
CV fold: Fold2
Parameter 'ncores' is ignored for learner 'LearnerGlm'.
CV fold: Fold3
Parameter 'ncores' is ignored for learner 'LearnerGlm'.
CV fold: Fold4
Parameter 'ncores' is ignored for learner 'LearnerGlm'.
CV fold: Fold5
Parameter 'ncores' is ignored for learner 'LearnerGlm'.
Saving _problems/test-glm_predictions-79.R
CV fold: Fold1
Parameter 'ncores' is ignored for learner 'LearnerLm'.
CV fold: Fold2
Parameter 'ncores' is ignored for learner 'LearnerLm'.
CV fold: Fold3
Parameter 'ncores' is ignored for learner 'LearnerLm'.
CV fold: Fold4
Parameter 'ncores' is ignored for learner 'LearnerLm'.
CV fold: Fold5
Parameter 'ncores' is ignored for learner 'LearnerLm'.
Saving _problems/test-glm_predictions-188.R
CV fold: Fold1
CV fold: Fold2
CV fold: Fold3
Registering parallel backend using 2 cores.
Running initial scoring function 11 times in 2 thread(s)... 20.172 seconds
Starting Epoch 1
1) Fitting Gaussian Process...
2) Running local optimum search... 0.636 seconds
Noise could not be added to find unique parameter set. Stopping process and returning results so far.
Registering parallel backend using 2 cores.
Running initial scoring function 11 times in 2 thread(s)... 19.262 seconds
Starting Epoch 1
1) Fitting Gaussian Process...
2) Running local optimum search... 0.602 seconds
Noise could not be added to find unique parameter set. Stopping process and returning results so far.
Registering parallel backend using 2 cores.
Running initial scoring function 4 times in 2 thread(s)... 8.431 seconds
Starting Epoch 1
1) Fitting Gaussian Process...
2) Running local optimum search... 0.636 seconds
3) Running FUN 2 times in 2 thread(s)... 4.848 seconds
CV fold: Fold1
Registering parallel backend using 2 cores.
Running initial scoring function 11 times in 2 thread(s)... 7.613 seconds
Starting Epoch 1
1) Fitting Gaussian Process...
2) Running local optimum search... 0.519 seconds
Noise could not be added to find unique parameter set. Stopping process and returning results so far.
CV fold: Fold2
Registering parallel backend using 2 cores.
Running initial scoring function 11 times in 2 thread(s)... 11.009 seconds
Starting Epoch 1
1) Fitting Gaussian Process...
2) Running local optimum search... 0.744 seconds
Noise could not be added to find unique parameter set. Stopping process and returning results so far.
CV fold: Fold3
Registering parallel backend using 2 cores.
Running initial scoring function 11 times in 2 thread(s)... 12.012 seconds
Starting Epoch 1
1) Fitting Gaussian Process...
2) Running local optimum search... 0.718 seconds
Noise could not be added to find unique parameter set. Stopping process and returning results so far.
CV fold: Fold1
CV fold: Fold2
CV fold: Fold3
CV fold: Fold1
Parameter 'ncores' is ignored for learner 'LearnerLm'.
CV fold: Fold2
Parameter 'ncores' is ignored for learner 'LearnerLm'.
CV fold: Fold3
Parameter 'ncores' is ignored for learner 'LearnerLm'.
CV fold: Fold1
Parameter 'ncores' is ignored for learner 'LearnerLm'.
CV fold: Fold2
Parameter 'ncores' is ignored for learner 'LearnerLm'.
CV fold: Fold3
Parameter 'ncores' is ignored for learner 'LearnerLm'.
CV fold: Fold1
Parameter 'ncores' is ignored for learner 'LearnerLm'.
CV fold: Fold2
Parameter 'ncores' is ignored for learner 'LearnerLm'.
CV fold: Fold3
Parameter 'ncores' is ignored for learner 'LearnerLm'.
CV fold: Fold1
Parameter 'ncores' is ignored for learner 'LearnerLm'.
CV fold: Fold2
Parameter 'ncores' is ignored for learner 'LearnerLm'.
CV fold: Fold3
Parameter 'ncores' is ignored for learner 'LearnerLm'.
CV fold: Fold1
CV fold: Fold2
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)... 19.932 seconds
Starting Epoch 1
1) Fitting Gaussian Process...
2) Running local optimum search... 0.703 seconds
3) Running FUN 2 times in 2 thread(s)... 3.675 seconds
Classification: using 'mean misclassification error' as optimization metric.
Classification: using 'mean misclassification error' as optimization metric.
Classification: using 'mean misclassification error' as optimization metric.
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)... 9.65 seconds
Starting Epoch 1
1) Fitting Gaussian Process...
2) Running local optimum search... 0.721 seconds
3) Running FUN 2 times in 2 thread(s)... 1.914 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)... 9.884 seconds
Starting Epoch 1
1) Fitting Gaussian Process...
2) Running local optimum search... 0.504 seconds
3) Running FUN 2 times in 2 thread(s)... 2.026 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)... 9.795 seconds
Starting Epoch 1
1) Fitting Gaussian Process...
2) Running local optimum search... 0.64 seconds
3) Running FUN 2 times in 2 thread(s)... 1.818 seconds
CV fold: Fold1
Classification: using 'mean misclassification error' as optimization metric.
Classification: using 'mean misclassification error' as optimization metric.
Classification: using 'mean misclassification error' as optimization metric.
CV fold: Fold2
Classification: using 'mean misclassification error' as optimization metric.
Classification: using 'mean misclassification error' as optimization metric.
Classification: using 'mean misclassification error' as optimization metric.
CV fold: Fold3
Classification: using 'mean misclassification error' as optimization metric.
Classification: using 'mean misclassification error' as optimization metric.
Classification: using 'mean misclassification error' as optimization metric.
CV fold: Fold1
CV fold: Fold2
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)... 2.866 seconds
Starting Epoch 1
1) Fitting Gaussian Process...
2) Running local optimum search... 0.515 seconds
3) Running FUN 2 times in 2 thread(s)... 0.382 seconds
Regression: using 'mean squared error' as optimization metric.
Regression: using 'mean squared error' as optimization metric.
Regression: using 'mean squared error' as optimization metric.
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)... 3.752 seconds
Starting Epoch 1
1) Fitting Gaussian Process...
2) Running local optimum search... 0.709 seconds
3) Running FUN 2 times in 2 thread(s)... 0.434 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.341 seconds
Starting Epoch 1
1) Fitting Gaussian Process...
2) Running local optimum search... 0.435 seconds
3) Running FUN 2 times in 2 thread(s)... 0.439 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.113 seconds
Starting Epoch 1
1) Fitting Gaussian Process...
2) Running local optimum search... 0.525 seconds
3) Running FUN 2 times in 2 thread(s)... 0.413 seconds
CV fold: Fold1
Regression: using 'mean squared error' as optimization metric.
Regression: using 'mean squared error' as optimization metric.
Regression: using 'mean squared error' as optimization metric.
CV fold: Fold2
Regression: using 'mean squared error' as optimization metric.
Regression: using 'mean squared error' as optimization metric.
Regression: using 'mean squared error' as optimization metric.
CV fold: Fold3
Regression: using 'mean squared error' as optimization metric.
Regression: using 'mean squared error' as optimization metric.
Regression: using 'mean squared error' as optimization metric.
[ FAIL 2 | WARN 0 | SKIP 1 | PASS 68 ]
══ Skipped tests (1) ═══════════════════════════════════════════════════════════
• On CRAN (1): 'test-lints.R:10:5'
══ Failed tests ════════════════════════════════════════════════════════════════
── Error ('test-glm_predictions.R:73:5'): test predictions, binary - glm ───────
Error in ``[.data.table`(res, , `:=`(mean = mean(as.numeric(.SD), na.rm = na.rm), sd = stats::sd(as.numeric(.SD), na.rm = na.rm)), .SDcols = colnames(res), by = seq_len(nrow(res)))`: attempt access index 5/5 in VECTOR_ELT
Backtrace:
▆
1. └─mlexperiments::predictions(...) at test-glm_predictions.R:73:5
2. ├─...[]
3. └─data.table:::`[.data.table`(...)
── Error ('test-glm_predictions.R:182:5'): test predictions, regression - lm ───
Error in ``[.data.table`(res, , `:=`(mean = mean(as.numeric(.SD), na.rm = na.rm), sd = stats::sd(as.numeric(.SD), na.rm = na.rm)), .SDcols = colnames(res), by = seq_len(nrow(res)))`: attempt access index 5/5 in VECTOR_ELT
Backtrace:
▆
1. └─mlexperiments::predictions(...) at test-glm_predictions.R:182:5
2. ├─...[]
3. └─data.table:::`[.data.table`(...)
[ FAIL 2 | WARN 0 | SKIP 1 | PASS 68 ]
Error:
! Test failures.
Execution halted
- checking for unstated dependencies in vignettes ... OK
- checking package vignettes ... OK
- checking re-building of vignette outputs ... [32s/33s] OK
- checking PDF version of manual ... [5s/8s] OK
- checking HTML version of manual ... [2s/3s] OK
- checking for non-standard things in the check directory ... OK
- DONE
Status: 2 ERRORs