This function wraps a learner in such a way that the behavior of learner$chain is modified to use a new function definition. learner$train and learner$predict are unaffected.

Custom_chain

customize_chain(learner, chain_fun)

Arguments

learner

A sl3 learner to modify.

chain_fun

A function with arguments learner and task that defines the new chain behavior.

Format

R6Class object.

Value

Lrnr_base object with methods for training and prediction

Fields

params

A list of learners to chain.

Methods

new(...)

This method is used to create a pipeline of learners. Arguments should be indiviual Learners, in the order they should be applied.

See also

Other Learners: Lrnr_HarmonicReg, Lrnr_arima, Lrnr_bartMachine, Lrnr_base, Lrnr_bilstm, Lrnr_condensier, Lrnr_cv, Lrnr_define_interactions, Lrnr_expSmooth, Lrnr_glm_fast, Lrnr_glmnet, Lrnr_glm, Lrnr_h2o_grid, Lrnr_hal9001, Lrnr_independent_binomial, Lrnr_lstm, Lrnr_mean, Lrnr_nnls, Lrnr_optim, Lrnr_pca, Lrnr_pkg_SuperLearner, Lrnr_randomForest, Lrnr_ranger, Lrnr_rpart, Lrnr_rugarch, Lrnr_sl, Lrnr_solnp_density, Lrnr_solnp, Lrnr_subset_covariates, Lrnr_svm, Lrnr_tsDyn, Lrnr_xgboost, Pipeline, Stack, define_h2o_X, undocumented_learner