Package: mllrnrs Check: examples New result: ERROR Running examples in ‘mllrnrs-Ex.R’ failed The error most likely occurred in: > base::assign(".ptime", proc.time(), pos = "CheckExEnv") > ### Name: LearnerGlmnet > ### Title: R6 Class to construct a Glmnet learner > ### Aliases: LearnerGlmnet > > ### ** Examples > > # binary classification > > library(mlbench) > data("PimaIndiansDiabetes2") > dataset <- PimaIndiansDiabetes2 |> + data.table::as.data.table() |> + na.omit() > > seed <- 123 > feature_cols <- colnames(dataset)[1:8] > > train_x <- model.matrix( + ~ -1 + ., + dataset[, .SD, .SDcols = feature_cols] + ) > train_y <- as.integer(dataset[, get("diabetes")]) - 1L > > fold_list <- splitTools::create_folds( + y = train_y, + k = 3, + type = "stratified", + seed = seed + ) > glmnet_cv <- mlexperiments::MLCrossValidation$new( + learner = mllrnrs::LearnerGlmnet$new( + metric_optimization_higher_better = FALSE + ), + fold_list = fold_list, + ncores = 2, + seed = 123 + ) > glmnet_cv$learner_args <- list( + alpha = 1, + lambda = 0.1, + family = "binomial", + type.measure = "class", + standardize = TRUE + ) > glmnet_cv$predict_args <- list(type = "response") > glmnet_cv$performance_metric_args <- list(positive = "1") > glmnet_cv$performance_metric <- mlexperiments::metric("auc") Error: Package "measures" must be installed to use function 'metric()'. Execution halted Package: mllrnrs Check: tests New result: ERROR Running ‘testthat.R’ [2s/2s] 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 > # https://github.com/Rdatatable/data.table/issues/5658 > Sys.setenv("OMP_THREAD_LIMIT" = 2) > Sys.setenv("Ncpu" = 2) > > library(testthat) > library(mllrnrs) > > test_check("mllrnrs") [ FAIL 17 | WARN 0 | SKIP 1 | PASS 0 ] ══ Skipped tests (1) ═══════════════════════════════════════════════════════════ • On CRAN (1): 'test-lints.R:10:5' ══ Failed tests ════════════════════════════════════════════════════════════════ ── Error ('test-glmnet_binary.R:88:5'): test nested cv, bayesian, binary - glmnet ── Error: Package "measures" must be installed to use function 'metric()'. Backtrace: ▆ 1. └─mlexperiments::metric("prauc") at test-glmnet_binary.R:88:5 ── Error ('test-glmnet_binary.R:134:5'): test nested cv, grid - glmnet, errors ── Error: Package "measures" must be installed to use function 'metric()'. Backtrace: ▆ 1. └─mlexperiments::metric("prauc") at test-glmnet_binary.R:134:5 ── Error ('test-glmnet_multiclass.R:89:5'): test nested cv, bayesian, multiclass - glmnet ── Error: Package "measures" must be installed to use function 'metric()'. Backtrace: ▆ 1. └─mlexperiments::metric("bacc") at test-glmnet_multiclass.R:89:5 ── Error ('test-glmnet_regression.R:87:5'): test nested cv, bayesian, regression - glmnet ── Error: Package "measures" must be installed to use function 'metric()'. Backtrace: ▆ 1. └─mlexperiments::metric("rmsle") at test-glmnet_regression.R:87:5 ── Error ('test-glmnet_regression.R:134:5'): test nested cv, grid - glmnet ───── Error: Package "measures" must be installed to use function 'metric()'. Backtrace: ▆ 1. └─mlexperiments::metric("rmsle") at test-glmnet_regression.R:134:5 ── Error ('test-lightgbm_binary.R:99:5'): test nested cv, bayesian, binary - lightgbm ── Error: Package "measures" must be installed to use function 'metric()'. Backtrace: ▆ 1. └─mlexperiments::metric("auc") at test-lightgbm_binary.R:99:5 ── Error ('test-lightgbm_multiclass.R:101:5'): test nested cv, bayesian, multiclass - lightgbm ── Error: Package "measures" must be installed to use function 'metric()'. Backtrace: ▆ 1. └─mlexperiments::metric("bacc") at test-lightgbm_multiclass.R:101:5 ── Error ('test-lightgbm_regression.R:99:5'): test nested cv, bayesian, regression - lightgbm ── Error: Package "measures" must be installed to use function 'metric()'. Backtrace: ▆ 1. └─mlexperiments::metric("msle") at test-lightgbm_regression.R:99:5 ── Error ('test-lightgbm_regression.R:141:5'): test nested cv, grid - lightgbm ── Error: Package "measures" must be installed to use function 'metric()'. Backtrace: ▆ 1. └─mlexperiments::metric("msle") at test-lightgbm_regression.R:141:5 ── Error ('test-ranger_binary.R:92:5'): test nested cv, bayesian, binary - ranger ── Error: Package "measures" must be installed to use function 'metric()'. Backtrace: ▆ 1. └─mlexperiments::metric("auc") at test-ranger_binary.R:92:5 ── Error ('test-ranger_multiclass.R:93:5'): test nested cv, bayesian, regression - ranger ── Error: Package "measures" must be installed to use function 'metric()'. Backtrace: ▆ 1. └─mlexperiments::metric("bacc") at test-ranger_multiclass.R:93:5 ── Error ('test-ranger_regression.R:87:5'): test nested cv, bayesian, regression - ranger ── Error: Package "measures" must be installed to use function 'metric()'. Backtrace: ▆ 1. └─mlexperiments::metric("msle") at test-ranger_regression.R:87:5 ── Error ('test-ranger_regression.R:125:5'): test nested cv, grid - ranger ───── Error: Package "measures" must be installed to use function 'metric()'. Backtrace: ▆ 1. └─mlexperiments::metric("msle") at test-ranger_regression.R:125:5 ── Error ('test-xgboost_binary.R:83:5'): test nested cv, bayesian, binary:logistic - xgboost ── Error: Package "measures" must be installed to use function 'metric()'. Backtrace: ▆ 1. └─mlexperiments::metric("auc") at test-xgboost_binary.R:83:5 ── Error ('test-xgboost_multiclass.R:86:5'): test nested cv, bayesian, multi:softprob - xgboost, with weights ── Error: Package "measures" must be installed to use function 'metric()'. Backtrace: ▆ 1. └─mlexperiments::metric("bacc") at test-xgboost_multiclass.R:86:5 ── Error ('test-xgboost_regression.R:82:5'): test nested cv, bayesian, reg:squarederror - xgboost ── Error: Package "measures" must be installed to use function 'metric()'. Backtrace: ▆ 1. └─mlexperiments::metric("msle") at test-xgboost_regression.R:82:5 ── Error ('test-xgboost_regression.R:125:5'): test nested cv, grid - xgboost ─── Error: Package "measures" must be installed to use function 'metric()'. Backtrace: ▆ 1. └─mlexperiments::metric("msle") at test-xgboost_regression.R:125:5 [ FAIL 17 | WARN 0 | SKIP 1 | PASS 0 ] Error: Test failures Execution halted Package: mlsurvlrnrs Check: examples New 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