R Under development (unstable) (2026-10-28 r90783 ucrt) -- "Unsuffered Consequences" Copyright (C) 2026 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(BATTS) > # Defaults equal the paper's simulation settings (BATTS 0.3.0). > b <- formals(boots); s <- formals(batts) > stopifnot(identical(b$num_trees_max, 1000), identical(b$K_CV, 5), identical(b$max_resol, 4), + identical(b$learn_rate, 0.01), identical(b$n_bins, 32), identical(b$margin_scale, 0.1), + identical(b$n_min_obs_per_node, 1), isTRUE(b$use_gradient), + identical(b$subsample_fraction, 0.5), + identical(s$num_trees, 200), identical(s$size_burnin, 2000), + identical(s$size_backfitting, 1000), identical(s$lambda_0, 5), identical(s$thin, 1), + identical(eval(s$prob_moves), c(1/3, 1/3, 1/3)), identical(eval(s$omega_prior_parameters), c(1, 1)), + identical(eval(s$tree_priors), c(0.95, 2)), identical(s$margin_scale, 0.1), + identical(s$n_bins, 100), identical(s$max_resol, 0), isFALSE(s$use_gradient)) > # A default boots() call equals the explicit simulation call with the same seed. > set.seed(5) > x <- cbind(c(rnorm(40), rnorm(40, .6)), rnorm(80)); g <- rep(0:1, each = 40) > set.seed(11); d <- boots(x, g, num_trees_max = 30, quiet = TRUE) Warning message: boots() is deprecated; use batts_boost() instead (see ?`BATTS-deprecated`). boots() still works and gives the same result. This warning is shown once per session. > set.seed(11); e <- boots(x, g, num_trees_max = 30, K_CV = 5, max_resol = 4, learn_rate = .01, + use_gradient = TRUE, subsample_fraction = .5, quiet = TRUE) > stopifnot(identical(d, e)) > cat('Default settings checks passed.\n') Default settings checks passed. > > proc.time() user system elapsed 0.23 0.10 0.34