This learner provides fitting procedures for an adaptive regression procedure using piecewise linear splines to model the response, using the the polspline package' functions polymars (for continuous outcome prediction) or polyclass (for binary or categorical outcome prediction).

Format

An R6Class object inheriting from Lrnr_base.

Value

A learner object inheriting from Lrnr_base with methods for training and prediction. For a full list of learner functionality, see the complete documentation of Lrnr_base.

Parameters

  • ...: Other parameters passed to polymars, polyclass, or additional arguments defined in Lrnr_base (such as params like formula). See their documentation for details.

Examples

data(cpp_imputed)
covs <- c("apgar1", "apgar5", "parity", "gagebrth", "mage", "meducyrs")
task <- sl3_Task$new(cpp_imputed, covariates = covs, outcome = "haz")
polspline_lrnr <- Lrnr_caret$new(method = "rf")
set.seed(693)
polspline_lrnr_fit <- polspline_lrnr$train(task)
polspline_lrnr_predictions <- polspline_lrnr_fit$predict()