tests/testthat/test-SDAM.R

# test of automatic adaption of breaks depending on data
set.seed(1)
X <- matrix(rnorm(100 * 4), ncol = 4)
X[1:50, 3] <- 0
Y <- sin(X[, 1]) -  X[, 2] + rnorm(100)

# estimate model
expect_no_error(SDAM(x = X, y = Y, n_K = 1, verbose = FALSE, nfolds = 2))

Try the SDModels package in your browser

Any scripts or data that you put into this service are public.

SDModels documentation built on April 11, 2025, 5:50 p.m.