A CPO object can be attached to a Learner object to create a pipeline combining preprocessing and model fitting. When the resulting CPOLearner is used to create a model using train, the attached CPO will be applied to the data before the internal model is trained. The resulting model will also contain the required CPOTrained elements, and apply the necessary CPORetrafo objects to new prediction data, and the CPOInverter objects to predictions made by the internal model.

The %>>% operator can be used synonymously to attach CPO objects to Learners.

attachCPO(cpo, learner)

Arguments

cpo

[CPO]
The cpo.

learner

[Learner]
The learner.

See also

Other operators: CPO, %>>%(), applyCPO(), as.list.CPO, composeCPO(), pipeCPO()

Other CPO lifecycle related: CPOConstructor, CPOLearner, CPOTrained, CPO, NULLCPO, %>>%(), composeCPO(), getCPOClass(), getCPOConstructor(), getCPOTrainedCPO(), identicalCPO(), makeCPO()

Other CPOLearner related: CPOLearner, getLearnerBare(), getLearnerCPO()